![]() |
aGrUM
0.20.2
a C++ library for (probabilistic) graphical models
|
<agrum/PRM/elements/formAttribute.h> More...
#include <PRMFormAttribute.h>
Public Member Functions | |
PRMFormAttribute (const PRMClass< GUM_SCALAR > &c, const std::string &name, const PRMType &type, MultiDimImplementation< std::string > *impl=new MultiDimArray< std::string >()) | |
virtual | ~PRMFormAttribute () |
virtual PRMAttribute< GUM_SCALAR > * | newFactory (const PRMClass< GUM_SCALAR > &c) const |
See gum::prm::PRMAttribute. More... | |
virtual PRMAttribute< GUM_SCALAR > * | copy (Bijection< const DiscreteVariable *, const DiscreteVariable * > bij) const |
See gum::prm::PRMAttribute. More... | |
virtual void | copyCpf (const Bijection< const DiscreteVariable *, const DiscreteVariable * > &bif, const PRMAttribute< GUM_SCALAR > &source) |
See gum::prm::PRMAttribute. More... | |
virtual PRMClassElement< GUM_SCALAR >::ClassElementType | elt_type () const |
See gum::prm::PRMAttribute. More... | |
virtual PRMType & | type () |
See gum::prm::PRMAttribute. More... | |
virtual const PRMType & | type () const |
See gum::prm::PRMAttribute. More... | |
virtual const Potential< GUM_SCALAR > & | cpf () const |
See gum::prm::PRMAttribute. More... | |
virtual void | addParent (const PRMClassElement< GUM_SCALAR > &elt) |
See gum::prm::PRMAttribute. More... | |
virtual void | addChild (const PRMClassElement< GUM_SCALAR > &elt) |
See gum::prm::PRMAttribute. More... | |
virtual PRMAttribute< GUM_SCALAR > * | getCastDescendant () const |
See gum::prm::PRMAttribute. More... | |
virtual void | setAsCastDescendant (PRMAttribute< GUM_SCALAR > *attr) |
See gum::prm::PRMAttribute. More... | |
virtual void | becomeCastDescendant (PRMType &subtype) |
Change this attribute to be a cast descendant of a an attribute with type subtype. More... | |
virtual MultiDimImplementation< std::string > & | formulas () |
virtual const MultiDimImplementation< std::string > & | formulas () const |
virtual void | swap (const PRMType &old_type, const PRMType &new_type) |
Swap old_type with new_type in the PRMClassElement cpt. More... | |
Getters & setters | |
virtual void | overload (PRMAttribute< GUM_SCALAR > *source) |
Set this as overload of source (necessayr to preserver internal pointers for MultiDims). More... | |
Getters & setters | |
NodeId | id () const |
Returns the NodeId of this element in it's class DAG. More... | |
virtual void | setId (NodeId id) |
Used to assign the id of this element. More... | |
virtual PRMObject::prm_type | obj_type () const |
Fast access to random variable's properties | |
const std::string & | safeName () const |
Returns the safe name of this PRMClassElement, if any. More... | |
virtual std::string | cast (const PRMType &t) const |
Returns the name of the cast descendant with PRMType t of this PRMClassElement. More... | |
Getters & setters. | |
const std::string & | name () const |
Returns the name of this object. More... | |
void | name (const std::string &name) |
Change the name of the PRM Object. More... | |
Operators | |
bool | operator== (const PRMObject &obj) const |
To PRMObject are equal if they have the same name (which is unique). More... | |
bool | operator!= (const PRMObject &obj) const |
To PRMObject are equal if they have the same name (which is unique). More... | |
Protected Attributes | |
std::string | safeName_ |
The safe name of this PRMClassElement. More... | |
Protected Member Functions | |
virtual PRMType * | type_ () |
virtual void | type_ (PRMType *t) |
Built-in type | |
enum | ClassElementType { prm_attribute, prm_aggregate, prm_refslot, prm_slotchain, prm_parameter } |
Returns true if obj_ptr is of type PRMReferenceSlot. More... | |
static std::string | enum2str (ClassElementType type) |
Returns true if obj_ptr is of type PRMReferenceSlot. More... | |
static INLINE bool | isReferenceSlot (const PRMClassElement< GUM_SCALAR > &elt) |
Returns true if obj_ptr is of type PRMReferenceSlot. More... | |
static INLINE bool | isAttribute (const PRMClassElement< GUM_SCALAR > &elt) |
Returns true if obj_ptr is of type PRMAttribute. More... | |
static INLINE bool | isAggregate (const PRMClassElement< GUM_SCALAR > &elt) |
Return true if obj is of type PRMAggregate. More... | |
static INLINE bool | isSlotChain (const PRMClassElement< GUM_SCALAR > &elt) |
Return true if obj is of type PRMSlotChain. More... | |
static INLINE bool | isParameter (const PRMClassElement< GUM_SCALAR > &elt) |
Return true if obj is of type PRMParameter. More... | |
Built-in types. | |
enum | prm_type : char { prm_type::ALL, prm_type::CLASS, prm_type::PRM_INTERFACE, prm_type::CLASS_ELT, prm_type::TYPE, prm_type::SYSTEM, prm_type::INSTANCE } |
Enumeration of the different types of objects handled by a PRM. More... | |
static std::string | enum2str (prm_type type) |
Returns the string representation of a PRMObject. More... | |
static std::string | LEFT_CAST () |
Enumeration of the different types of objects handled by a PRM. More... | |
static std::string | RIGHT_CAST () |
Enumeration of the different types of objects handled by a PRM. More... | |
static INLINE bool | isClass (const PRMObject &obj) |
Returns true if obj_ptr is of type Class. More... | |
static INLINE bool | isInterface (const PRMObject &obj) |
Returns true if obj_ptr is of type PRMInterface. More... | |
static INLINE bool | isInstance (const PRMObject &obj) |
Returns true if obj_ptr is of type PRMInstance. More... | |
<agrum/PRM/elements/formAttribute.h>
PRMFormAttribute is a member of a Class in a PRM.
Definition at line 49 of file PRMFormAttribute.h.
|
inherited |
Returns true if obj_ptr is of type PRMReferenceSlot.
Enumerator | |
---|---|
prm_attribute | |
prm_aggregate | |
prm_refslot | |
prm_slotchain | |
prm_parameter |
Definition at line 94 of file PRMClassElement.h.
|
stronginherited |
Enumeration of the different types of objects handled by a PRM.
The "all" type is used to tell that we want any kind of PRMType (useful with iterators for example). No PRMObject will ever have "all" as type.
Enumerator | |
---|---|
ALL | |
CLASS | |
PRM_INTERFACE | |
CLASS_ELT | |
TYPE | |
SYSTEM | |
INSTANCE |
Definition at line 68 of file PRMObject.h.
gum::prm::PRMFormAttribute< GUM_SCALAR >::PRMFormAttribute | ( | const PRMClass< GUM_SCALAR > & | c, |
const std::string & | name, | ||
const PRMType & | type, | ||
MultiDimImplementation< std::string > * | impl = new MultiDimArray< std::string >() |
||
) |
Definition at line 42 of file PRMFormAttribute_tpl.h.
|
virtual |
Definition at line 56 of file PRMFormAttribute_tpl.h.
|
private |
Definition at line 259 of file PRMFormAttribute_tpl.h.
|
virtual |
Implements gum::prm::PRMAttribute< GUM_SCALAR >.
Definition at line 182 of file PRMFormAttribute_tpl.h.
|
virtual |
Implements gum::prm::PRMAttribute< GUM_SCALAR >.
Definition at line 162 of file PRMFormAttribute_tpl.h.
|
virtual |
Change this attribute to be a cast descendant of a an attribute with type subtype.
Implements gum::prm::PRMAttribute< GUM_SCALAR >.
Definition at line 234 of file PRMFormAttribute_tpl.h.
|
virtualinherited |
Returns the name of the cast descendant with PRMType t of this PRMClassElement.
t | The type in which we want to cast this PRMClassElement. |
OperationNotAllowed | If the cast is impossible. |
Definition at line 75 of file PRMClassElement_tpl.h.
|
virtual |
Implements gum::prm::PRMAttribute< GUM_SCALAR >.
Definition at line 75 of file PRMFormAttribute_tpl.h.
|
virtual |
Implements gum::prm::PRMAttribute< GUM_SCALAR >.
Definition at line 95 of file PRMFormAttribute_tpl.h.
|
virtual |
Implements gum::prm::PRMAttribute< GUM_SCALAR >.
Definition at line 156 of file PRMFormAttribute_tpl.h.
|
virtual |
Implements gum::prm::PRMAttribute< GUM_SCALAR >.
Definition at line 141 of file PRMFormAttribute_tpl.h.
|
inlinestaticinherited |
|
inlinestaticinherited |
Returns true if obj_ptr is of type PRMReferenceSlot.
Definition at line 103 of file PRMClassElement.h.
|
private |
Definition at line 273 of file PRMFormAttribute_tpl.h.
|
virtual |
Definition at line 311 of file PRMFormAttribute_tpl.h.
|
virtual |
Definition at line 321 of file PRMFormAttribute_tpl.h.
|
virtual |
Implements gum::prm::PRMAttribute< GUM_SCALAR >.
Definition at line 187 of file PRMFormAttribute_tpl.h.
|
inherited |
Returns the NodeId of this element in it's class DAG.
Definition at line 54 of file PRMClassElement_tpl.h.
|
inlinestaticinherited |
|
inlinestaticinherited |
Returns true if obj_ptr is of type Class.
Definition at line 109 of file PRMObject.h.
References gum::prm::PRMObject::PRMObject().
Returns true if obj_ptr is of type PRMInstance.
Definition at line 119 of file PRMObject.h.
References gum::prm::PRMObject::PRMObject().
Returns true if obj_ptr is of type PRMInterface.
Definition at line 114 of file PRMObject.h.
References gum::prm::PRMObject::PRMObject().
|
inlinestaticinherited |
|
inlinestaticinherited |
Returns true if obj_ptr is of type PRMReferenceSlot.
Definition at line 127 of file PRMClassElement.h.
|
inlinestaticinherited |
|
inlinestaticinherited |
Enumeration of the different types of objects handled by a PRM.
The "all" type is used to tell that we want any kind of PRMType (useful with iterators for example). No PRMObject will ever have "all" as type.
Definition at line 79 of file PRMObject.h.
|
inherited |
Returns the name of this object.
Definition at line 34 of file PRMObject_inl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
|
inherited |
Change the name of the PRM Object.
Definition at line 38 of file PRMObject_inl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
|
virtual |
Implements gum::prm::PRMAttribute< GUM_SCALAR >.
Definition at line 64 of file PRMFormAttribute_tpl.h.
|
virtualinherited |
Implements gum::prm::PRMObject.
Definition at line 59 of file PRMClassElement_tpl.h.
To PRMObject are equal if they have the same name (which is unique).
Definition at line 48 of file PRMObject_inl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
|
private |
Definition at line 267 of file PRMFormAttribute_tpl.h.
To PRMObject are equal if they have the same name (which is unique).
Definition at line 42 of file PRMObject_inl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
|
virtualinherited |
Set this as overload of source (necessayr to preserver internal pointers for MultiDims).
Definition at line 52 of file PRMAttribute_tpl.h.
|
inlinestaticinherited |
Enumeration of the different types of objects handled by a PRM.
The "all" type is used to tell that we want any kind of PRMType (useful with iterators for example). No PRMObject will ever have "all" as type.
Definition at line 80 of file PRMObject.h.
|
inherited |
Returns the safe name of this PRMClassElement, if any.
This will only work if this PRMClassElement is an PRMAttribute or an PRMAggregate.
NotFound& | Raised if this PRMClassElement does not have any safe name. |
Definition at line 69 of file PRMClassElement_tpl.h.
|
virtual |
Implements gum::prm::PRMAttribute< GUM_SCALAR >.
Definition at line 217 of file PRMFormAttribute_tpl.h.
|
virtualinherited |
Used to assign the id of this element.
Definition at line 64 of file PRMClassElement_tpl.h.
|
virtual |
Swap old_type with new_type in the PRMClassElement cpt.
Implements gum::prm::PRMAttribute< GUM_SCALAR >.
Definition at line 326 of file PRMFormAttribute_tpl.h.
|
virtual |
Implements gum::prm::PRMAttribute< GUM_SCALAR >.
Definition at line 146 of file PRMFormAttribute_tpl.h.
|
virtual |
Implements gum::prm::PRMAttribute< GUM_SCALAR >.
Definition at line 151 of file PRMFormAttribute_tpl.h.
|
protectedvirtual |
Implements gum::prm::PRMAttribute< GUM_SCALAR >.
Definition at line 372 of file PRMFormAttribute_tpl.h.
|
protectedvirtual |
Implements gum::prm::PRMAttribute< GUM_SCALAR >.
Definition at line 377 of file PRMFormAttribute_tpl.h.
|
private |
A pointe toward the class of this attribute.
Definition at line 122 of file PRMFormAttribute.h.
|
mutableprivate |
A pointer on the Potential of this attribute.
Definition at line 116 of file PRMFormAttribute.h.
|
private |
A pointer on the Potential of this attribute.
Definition at line 119 of file PRMFormAttribute.h.
|
protectedinherited |
The safe name of this PRMClassElement.
Definition at line 266 of file PRMClassElement.h.
|
private |
The random variable type of this attribute.
Definition at line 113 of file PRMFormAttribute.h.