![]() |
aGrUM
0.14.2
|
A PRMClass is an object of a PRM representing a fragment of a Bayesian Network which can be instantiated in PRMInstance. More...
#include <agrum/PRM/elements/PRMClass.h>
Public Member Functions | |
Constructors & destructor. | |
PRMClass (const std::string &name) | |
Default constructor. More... | |
PRMClass (const std::string &name, PRMClass< GUM_SCALAR > &super, bool delayInheritance=false) | |
Constructor for building a subclass of super. More... | |
PRMClass (const std::string &name, const Set< PRMInterface< GUM_SCALAR > * > &set, bool delayInheritance=false) | |
Constructor for building a Class<GUM_SCALAR> implementing several each interface in set. More... | |
PRMClass (const std::string &name, PRMClass< GUM_SCALAR > &super, const Set< PRMInterface< GUM_SCALAR > * > &set, bool delayInheritance=false) | |
Constructor for building a subclass of super and implementing each interface in set. More... | |
PRMClass (const PRMClass< GUM_SCALAR > &source)=delete | |
Copy constructor. More... | |
PRMClass (const PRMClass< GUM_SCALAR > &&source)=delete | |
Move constructor. More... | |
PRMClass< GUM_SCALAR > & | operator= (const PRMClass< GUM_SCALAR > &source)=delete |
Copy operator. Don't use it. More... | |
PRMClass< GUM_SCALAR > & | operator= (const PRMClass< GUM_SCALAR > &&source)=delete |
Move operator. Don't use it. More... | |
virtual | ~PRMClass () |
Destructor. More... | |
virtual PRMObject::prm_type | obj_type () const |
Implementation of pure virtual method of PRMObject. More... | |
Graphical operator | |
PRMClassElement< GUM_SCALAR > & | get (NodeId id) |
See gum::prm::PRMClassElementContainer<GUM_SCALAR>::get(NodeId). More... | |
const PRMClassElement< GUM_SCALAR > & | get (NodeId id) const |
See gum::prm::PRMClassElementContainer<GUM_SCALAR>::get(NodeId). More... | |
PRMClassElement<GUM_SCALAR> getters and setters | |
virtual bool | isOutputNode (const PRMClassElement< GUM_SCALAR > &elt) const |
Returns true if elt is an output node. More... | |
bool | isCastDescendant (const std::string &safe_name) const |
Return true if the attribute named safe_name is a cast descendant. More... | |
PRMClassElement< GUM_SCALAR > & | get (const std::string &name) |
See gum::prm::PRMClassElementContainer<GUM_SCALAR>::get(const std::string&). More... | |
const PRMClassElement< GUM_SCALAR > & | get (const std::string &name) const |
See gum::prm::PRMClassElementContainer<GUM_SCALAR>::get(const std::string&). More... | |
virtual NodeId | add (PRMClassElement< GUM_SCALAR > *elt) |
See gum::prm::add(PRMClassElement<GUM_SCALAR>*). More... | |
virtual NodeId | overload (PRMClassElement< GUM_SCALAR > *elt) |
See gum::prm::overload(PRMClassElement<GUM_SCALAR>*). More... | |
virtual void | addArc (const std::string &tail, const std::string &head) |
See gum::prm::PRMClassElementContainer<GUM_SCALAR>::addArc(). More... | |
const Set< PRMAttribute< GUM_SCALAR > *> & | attributes () const |
Returns the set of PRMAttribute<GUM_SCALAR> of this Class<GUM_SCALAR>. More... | |
const Set< PRMParameter< GUM_SCALAR > *> & | parameters () const |
Returns the set of parameters of this Class<GUM_SCALAR>. More... | |
HashTable< std::string, const PRMParameter< GUM_SCALAR > *> | scope () const |
Returns all the parameters in the scope of this class. More... | |
const Set< PRMAggregate< GUM_SCALAR > *> & | aggregates () const |
Returns the set of PRMAggregate<GUM_SCALAR> of this Class<GUM_SCALAR>. More... | |
const Set< PRMReferenceSlot< GUM_SCALAR > *> & | referenceSlots () const |
Returns the set of PRMReferenceSlot<GUM_SCALAR> of this Class<GUM_SCALAR>. More... | |
const Set< PRMSlotChain< GUM_SCALAR > *> & | slotChains () const |
Returns the set of PRMSlotChain<GUM_SCALAR> of this Class<GUM_SCALAR>. More... | |
Inheritance methods | |
virtual bool | isSubTypeOf (const PRMClassElementContainer< GUM_SCALAR > &cec) const |
Test if this Class<GUM_SCALAR> is a subclass of cec. More... | |
const PRMClass< GUM_SCALAR > & | super () const |
Returns the super Class<GUM_SCALAR> of this Class<GUM_SCALAR>. More... | |
const Set< PRMInterface< GUM_SCALAR > *> & | implements () const |
Returns the Set of PRMInterface<GUM_SCALAR> implemented by this Class<GUM_SCALAR>. More... | |
const Set< PRMClass< GUM_SCALAR > *> & | extensions () const |
Returns the set of Class<GUM_SCALAR> which are direct sub-Class<GUM_SCALAR> of this Class<GUM_SCALAR>. More... | |
Getters & setters operators | |
PRMClassElement< GUM_SCALAR > & | operator[] (NodeId id) |
See gum::prm::PRMClassElementContainer<GUM_SCALAR>::operator[](NodeId). More... | |
const PRMClassElement< GUM_SCALAR > & | operator[] (NodeId id) const |
See gum::prm::PRMClassElementContainer<GUM_SCALAR>::operator[](NodeId). More... | |
PRMClassElement< GUM_SCALAR > & | operator[] (const std::string &name) |
See gum::prm::PRMClassElementContainer<GUM_SCALAR>::operator[](const std::string&). More... | |
const PRMClassElement< GUM_SCALAR > & | operator[] (const std::string &name) const |
See gum::prm::PRMClassElementContainer<GUM_SCALAR>::operator[](const std::string&). More... | |
For custom inheritance | |
void | inheritReferenceSlots () |
void | inheritParameters () |
void | inheritAttributes () |
void | inheritAggregates () |
void | inheritSlotChains () |
void | initializeInheritance () |
void | completeInheritance (const std::string &attr) |
Getters on the gum::PRMClassElement<GUM_SCALAR>. | |
virtual bool | belongsTo (const PRMClassElement< GUM_SCALAR > &elt) const |
Returns true if elt belongs to this PRMClassElementContainer. More... | |
virtual bool | exists (const std::string &name) const |
Returns true if a member with the given name exists in this PRMClassElementContainer or in the PRMClassElementContainer hierarchy. More... | |
virtual bool | isInputNode (const PRMClassElement< GUM_SCALAR > &elt) const |
Returns true if the node is an input node. More... | |
virtual void | setInputNode (const PRMClassElement< GUM_SCALAR > &elt, bool b) |
Set the input flag value of id at b. More... | |
virtual void | setOutputNode (const PRMClassElement< GUM_SCALAR > &elt, bool b) |
Set the output flag value of id at b. More... | |
virtual bool | isInnerNode (const PRMClassElement< GUM_SCALAR > &elt) const |
Returns true if the node is an inner node. More... | |
Graphical operator | |
virtual bool | exists (NodeId id) const |
Returns true if a member with the given id exists in this PRMClassElementContainer or in the PRMClassElementContainer hierarchy. More... | |
virtual const DAG & | containerDag () const |
Returns the gum::DAG of this PRMClassElementContainer. More... | |
Inheritance getters and setters | |
virtual bool | isSuperTypeOf (const PRMClassElementContainer< GUM_SCALAR > &cec) const |
Test if this PRMClassElementContainer is a super type of cec. 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 Member Functions | |
virtual const DAG & | _dag () const |
returns a constant reference over this interface's dag. More... | |
virtual DAG & | _dag () |
Returns a non constant reference over this PRMInterface<GUM_SCALAR>'s DAG. More... | |
void | _findAllSubtypes (Set< PRMClassElementContainer< GUM_SCALAR > * > &set) |
Fills set with all the subtypes of this Class<GUM_SCALAR>. More... | |
void | _updateDescendants (const PRMClassElement< GUM_SCALAR > &elt) |
See gum::prm::PRMClassElementContainer<GUM_SCALAR>(const PRMClassElement<GUM_SCALAR>&). More... | |
virtual std::pair< bool, bool > & | _getIOFlag (const PRMClassElement< GUM_SCALAR > &elt) |
Returns the IO flags of a PRMClassElement<GUM_SCALAR>. More... | |
virtual const std::pair< bool, bool > & | _getIOFlag (const PRMClassElement< GUM_SCALAR > &elt) const |
Returns the IO flags of a PRMClassElement<GUM_SCALAR>. More... | |
virtual void | _setIOFlag (const PRMClassElement< GUM_SCALAR > &elt, const std::pair< bool, bool > &flags) |
Defines the IO flags of a PRMClassElement<GUM_SCALAR>. More... | |
virtual void | _copyIOFlags (const PRMClassElementContainer< GUM_SCALAR > &c) |
Copy the IO Flags of c in this PRMClassElementContainer. More... | |
Friends | |
class | PRMInterface< GUM_SCALAR > |
PRMClassElement<GUM_SCALAR> members | |
HashTable< std::string, PRMClassElement< GUM_SCALAR > *> | __nameMap |
Mapping between a member's name and itself. Used for fast access to a member given it's name. More... | |
Set< PRMAttribute< GUM_SCALAR > *> | __attributes |
The sequence of PRMAttribute<GUM_SCALAR>s. More... | |
Set< PRMReferenceSlot< GUM_SCALAR > *> | __referenceSlots |
The sequence of PRMReferenceSlot<GUM_SCALAR>. More... | |
Set< PRMAggregate< GUM_SCALAR > *> | __aggregates |
The sequence of aggregate. More... | |
Set< PRMSlotChain< GUM_SCALAR > *> | __slotChains |
The set of gum::PRMSlotChain<GUM_SCALAR>s. More... | |
Set< PRMParameter< GUM_SCALAR > *> | __parameters |
The Set of parameters in this Class<GUM_SCALAR>. More... | |
void | __addCastDescendants (PRMClassElement< GUM_SCALAR > *attr) |
Recursively adds cast descendant of attr in this Class<GUM_SCALAR>. More... | |
void | __addCastDescendants (PRMAttribute< GUM_SCALAR > *start, PRMAttribute< GUM_SCALAR > *end) |
Recursively adds cast descendant from start to end in this Class<GUM_SCALAR>. More... | |
Inheritance members | |
PRMClass< GUM_SCALAR > * | __superClass |
The alternate PRMClassElementContainer<GUM_SCALAR> searched for elements defined in this. Note that this is first searched for gum::PRMClassElement<GUM_SCALAR>. More... | |
Set< PRMInterface< GUM_SCALAR > *> * | __implements |
The Set of implemented interface of this. More... | |
Set< PRMClass< GUM_SCALAR > *> | __extensions |
The set of Class<GUM_SCALAR> which are extension of this Class<GUM_SCALAR> (i.e. direct subtypes). More... | |
Bijection< const DiscreteVariable *, const DiscreteVariable *> * | __bijection |
The bijection between variables in super and variables in this The bijection's firsts are attributes in this and its seconds are attributes in c. More... | |
HashFunc< PRMClassElementContainer< GUM_SCALAR > *> | __dummy_hashfunc |
a dummy member used to fix a compilation issue in clang4 More... | |
void | __inheritClass (const PRMClass< GUM_SCALAR > &c) |
Proceed with the copy when this inherits c. More... | |
void | __implementInterfaces (bool delayInheritance) |
Proceed with the implementation of interfaces. More... | |
void | __checkInterfaces (PRMClassElement< GUM_SCALAR > *elt) |
Check that a given element respects all the class interfaces. More... | |
void | __checkInterface (PRMClassElement< GUM_SCALAR > *elt, PRMInterface< GUM_SCALAR > *i) |
Check that a given element respects a specific interface. More... | |
void | __checkRefInterfaces (PRMReferenceSlot< GUM_SCALAR > *elt) |
Check that a given element respects all the class interfaces. More... | |
void | __checkRefInterface (PRMReferenceSlot< GUM_SCALAR > *elt, PRMInterface< GUM_SCALAR > *i) |
Check that a given element respects a specific interface. More... | |
void | __addIOInterfaceFlags (PRMClassElement< GUM_SCALAR > *elt) |
Check if elt is present in an implementation. If it is, its IO flags are updated. More... | |
void | __addExtension (PRMClass< GUM_SCALAR > *c) |
This method is called when a sub-Class<GUM_SCALAR> of this Class<GUM_SCALAR> is created. More... | |
bool | __checkOverloadLegality (const PRMClassElement< GUM_SCALAR > *overloaded, const PRMClassElement< GUM_SCALAR > *overloader) |
Return true of overloaded can be overload by overloader. More... | |
void | __overloadAttribute (PRMAttribute< GUM_SCALAR > *overloader, PRMAttribute< GUM_SCALAR > *overloaded) |
Overloads an attribute. More... | |
void | __overloadAggregate (PRMAggregate< GUM_SCALAR > *overloader, PRMClassElement< GUM_SCALAR > *overloaded) |
Overloads an aggregate. More... | |
void | __overloadReference (PRMReferenceSlot< GUM_SCALAR > *overloader, PRMReferenceSlot< GUM_SCALAR > *overloaded) |
Overloads a reference slot. More... | |
void | __overloadParameter (PRMParameter< GUM_SCALAR > *overloader, PRMParameter< GUM_SCALAR > *overloaded) |
Overloads a parameter. 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 | 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 std::string | enum2str (prm_type type) |
Returns the string representation of a PRMObject. 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... | |
A PRMClass is an object of a PRM representing a fragment of a Bayesian Network which can be instantiated in PRMInstance.
Definition at line 63 of file PRMClass.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 66 of file PRMObject.h.
|
explicit |
Default constructor.
name | The class name. |
Definition at line 37 of file PRMClass_tpl.h.
gum::prm::PRMClass< GUM_SCALAR >::PRMClass | ( | const std::string & | name, |
PRMClass< GUM_SCALAR > & | super, | ||
bool | delayInheritance = false |
||
) |
Constructor for building a subclass of super.
name | The subclass name. |
super | The super Class<GUM_SCALAR> of this. |
delayInheritance | If true, inheritance will be delayed. |
Definition at line 44 of file PRMClass_tpl.h.
gum::prm::PRMClass< GUM_SCALAR >::PRMClass | ( | const std::string & | name, |
const Set< PRMInterface< GUM_SCALAR > * > & | set, | ||
bool | delayInheritance = false |
||
) |
Constructor for building a Class<GUM_SCALAR> implementing several each interface in set.
name | The sub class name. |
set | The Set of implemented interfaces. |
delayInheritance | If true, inheritance will be delayed. |
Definition at line 59 of file PRMClass_tpl.h.
gum::prm::PRMClass< GUM_SCALAR >::PRMClass | ( | const std::string & | name, |
PRMClass< GUM_SCALAR > & | super, | ||
const Set< PRMInterface< GUM_SCALAR > * > & | set, | ||
bool | delayInheritance = false |
||
) |
Constructor for building a subclass of super and implementing each interface in set.
name | The sub class name. |
super | The super Class<GUM_SCALAR> of this. |
set | The Set of implemented interfaces. |
delayInheritance | If true, inheritance will be delayed. |
Definition at line 72 of file PRMClass_tpl.h.
|
delete |
Copy constructor.
|
delete |
Move constructor.
|
virtual |
Destructor.
Definition at line 117 of file PRMClass_tpl.h.
|
private |
Recursively adds cast descendant of attr in this Class<GUM_SCALAR>.
Definition at line 692 of file PRMClass_tpl.h.
|
private |
Recursively adds cast descendant from start to end in this Class<GUM_SCALAR>.
Definition at line 940 of file PRMClass_tpl.h.
|
private |
This method is called when a sub-Class<GUM_SCALAR> of this Class<GUM_SCALAR> is created.
c | The Class<GUM_SCALAR> added as a direct sub-Class<GUM_SCALAR> of this. |
DuplicateElement | Raised if c is already a sub-Class<GUM_SCALAR> of this. |
Definition at line 1256 of file PRMClass_tpl.h.
Referenced by gum::prm::PRMClass< double >::__inheritClass(), and gum::prm::PRMClass< double >::initializeInheritance().
|
private |
Check if elt is present in an implementation. If it is, its IO flags are updated.
Definition at line 974 of file PRMClass_tpl.h.
|
private |
Check that a given element respects a specific interface.
Definition at line 539 of file PRMClass_tpl.h.
|
private |
Check that a given element respects all the class interfaces.
Definition at line 526 of file PRMClass_tpl.h.
|
private |
Return true of overloaded can be overload by overloader.
Definition at line 1208 of file PRMClass_tpl.h.
|
private |
Check that a given element respects a specific interface.
Definition at line 593 of file PRMClass_tpl.h.
|
private |
Check that a given element respects all the class interfaces.
Definition at line 581 of file PRMClass_tpl.h.
|
private |
Proceed with the implementation of interfaces.
Definition at line 99 of file PRMClass_tpl.h.
|
private |
Proceed with the copy when this inherits c.
Definition at line 312 of file PRMClass_tpl.h.
|
private |
Overloads an aggregate.
Definition at line 1200 of file PRMClass_tpl.h.
|
private |
Overloads an attribute.
Definition at line 804 of file PRMClass_tpl.h.
|
private |
Overloads a parameter.
Definition at line 927 of file PRMClass_tpl.h.
|
private |
Overloads a reference slot.
Definition at line 831 of file PRMClass_tpl.h.
|
protectedvirtualinherited |
Copy the IO Flags of c in this PRMClassElementContainer.
c | A PRMClassElementContainer. |
Definition at line 34 of file PRMClassElementContainer_tpl.h.
|
protectedvirtual |
returns a constant reference over this interface's dag.
Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.
Definition at line 1015 of file PRMClass_tpl.h.
|
protectedvirtual |
Returns a non constant reference over this PRMInterface<GUM_SCALAR>'s DAG.
Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.
Definition at line 1020 of file PRMClass_tpl.h.
|
protectedvirtual |
Fills set with all the subtypes of this Class<GUM_SCALAR>.
Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.
Definition at line 965 of file PRMClass_tpl.h.
Referenced by gum::prm::PRMClass< double >::_findAllSubtypes().
|
protectedvirtualinherited |
Returns the IO flags of a PRMClassElement<GUM_SCALAR>.
elt | The PRMClassElement<GUM_SCALAR>. |
NotFound | Raised if elt does not have any IO flags. |
Definition at line 128 of file PRMClassElementContainer_tpl.h.
|
protectedvirtualinherited |
Returns the IO flags of a PRMClassElement<GUM_SCALAR>.
elt | The PRMClassElement<GUM_SCALAR>. |
NotFound | Raised if elt does not have any IO flags. |
Definition at line 140 of file PRMClassElementContainer_tpl.h.
|
protectedvirtualinherited |
Defines the IO flags of a PRMClassElement<GUM_SCALAR>.
elt | The PRMClassElement<GUM_SCALAR>. |
flags | The IO flags of elt. Overwrite any existing flags. |
NotFound | Raised if elt does not have any IO flags. |
Definition at line 151 of file PRMClassElementContainer_tpl.h.
|
protectedvirtual |
See gum::prm::PRMClassElementContainer<GUM_SCALAR>(const PRMClassElement<GUM_SCALAR>&).
Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.
Definition at line 999 of file PRMClass_tpl.h.
|
virtual |
See gum::prm::add(PRMClassElement<GUM_SCALAR>*).
Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.
Definition at line 618 of file PRMClass_tpl.h.
Referenced by gum::prm::PRMFactory< GUM_SCALAR >::__retrieveInputs(), gum::prm::PRMFactory< GUM_SCALAR >::addAggregator(), gum::prm::PRMFactory< GUM_SCALAR >::addAttribute(), gum::prm::PRMFactory< GUM_SCALAR >::addNoisyOrCompound(), and gum::prm::PRMFactory< GUM_SCALAR >::startAggregator().
|
virtual |
See gum::prm::PRMClassElementContainer<GUM_SCALAR>::addArc().
Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.
Definition at line 480 of file PRMClass_tpl.h.
Referenced by gum::prm::PRMFactory< GUM_SCALAR >::__addParent(), gum::prm::PRMFactory< GUM_SCALAR >::addAggregator(), and gum::prm::PRMFactory< GUM_SCALAR >::addAttribute().
INLINE const Set< PRMAggregate< GUM_SCALAR > *> & gum::prm::PRMClass< GUM_SCALAR >::aggregates | ( | ) | const |
Returns the set of PRMAggregate<GUM_SCALAR> of this Class<GUM_SCALAR>.
Definition at line 1139 of file PRMClass_tpl.h.
INLINE const Set< PRMAttribute< GUM_SCALAR > *> & gum::prm::PRMClass< GUM_SCALAR >::attributes | ( | ) | const |
Returns the set of PRMAttribute<GUM_SCALAR> of this Class<GUM_SCALAR>.
Definition at line 1071 of file PRMClass_tpl.h.
|
virtualinherited |
Returns true if elt belongs to this PRMClassElementContainer.
elt | A PRMClassElement<GUM_SCALAR>. |
Definition at line 174 of file PRMClassElementContainer_tpl.h.
void gum::prm::PRMClass< GUM_SCALAR >::completeInheritance | ( | const std::string & | attr | ) |
Definition at line 289 of file PRMClass_tpl.h.
|
virtualinherited |
Returns the gum::DAG of this PRMClassElementContainer.
Be very careful when using NodeId with PRMClassElement<GUM_SCALAR>: there is no guarantee that an inherited PRMClassElement<GUM_SCALAR> will have the same NodeId than its superclass counterpart.
When dealing with different classes and interfaces ALWAYS use safe-name as identifier.
Definition at line 183 of file PRMClassElementContainer_tpl.h.
Referenced by gum::prm::ClassDependencyGraph< GUM_SCALAR >::__addArcs(), gum::prm::PRMClass< double >::__inheritClass(), gum::prm::ClassBayesNet< GUM_SCALAR >::__init(), gum::prm::SVED< GUM_SCALAR >::__initLiftedNodes(), gum::prm::SVE< GUM_SCALAR >::__initLiftedNodes(), gum::prm::PRMFactory< GUM_SCALAR >::addAttribute(), operator<<(), and gum::prm::PRMClass< double >::PRMClass().
|
inlinestaticinherited |
Returns the string representation of a PRMObject.
Definition at line 80 of file PRMObject.h.
References gum::prm::PRMObject::CLASS, gum::prm::PRMObject::CLASS_ELT, gum::prm::PRMObject::INSTANCE, gum::prm::PRMObject::PRM_INTERFACE, gum::prm::PRMObject::SYSTEM, and gum::prm::PRMObject::TYPE.
Referenced by gum::prm::operator<<().
|
virtualinherited |
Returns true if a member with the given name exists in this PRMClassElementContainer or in the PRMClassElementContainer hierarchy.
Definition at line 165 of file PRMClassElementContainer_tpl.h.
Referenced by gum::prm::o3prm::O3ClassFactory< GUM_SCALAR >::__checkLocalParent(), gum::prm::o3prm::O3SystemFactory< GUM_SCALAR >::__checkParameters(), gum::prm::o3prm::O3ClassFactory< GUM_SCALAR >::__checkSlotChainLink(), gum::prm::PRMFactory< GUM_SCALAR >::addNoisyOrCompound(), gum::prm::PRMFactory< GUM_SCALAR >::continueAggregator(), gum::prm::PRMFactory< GUM_SCALAR >::continueAttribute(), gum::prm::PRMClassElementContainer< double >::exists(), and gum::prm::PRMFactory< GUM_SCALAR >::startAttribute().
|
virtualinherited |
Returns true if a member with the given id exists in this PRMClassElementContainer or in the PRMClassElementContainer hierarchy.
id | A NodeId. |
Definition at line 160 of file PRMClassElementContainer_tpl.h.
INLINE const Set< PRMClass< GUM_SCALAR > *> & gum::prm::PRMClass< GUM_SCALAR >::extensions | ( | ) | const |
Returns the set of Class<GUM_SCALAR> which are direct sub-Class<GUM_SCALAR> of this Class<GUM_SCALAR>.
Definition at line 1251 of file PRMClass_tpl.h.
|
virtual |
See gum::prm::PRMClassElementContainer<GUM_SCALAR>::get(NodeId).
Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.
Definition at line 1025 of file PRMClass_tpl.h.
Referenced by gum::prm::PRMFactory< GUM_SCALAR >::__checkInterfaceImplementation(), gum::prm::o3prm::O3ClassFactory< GUM_SCALAR >::__checkLocalParent(), gum::prm::o3prm::O3SystemFactory< GUM_SCALAR >::__checkParameters(), gum::prm::o3prm::O3ClassFactory< GUM_SCALAR >::__checkRawCPT(), gum::prm::ClassBayesNet< GUM_SCALAR >::__init(), gum::prm::SVED< GUM_SCALAR >::__initLiftedNodes(), gum::prm::SVE< GUM_SCALAR >::__initLiftedNodes(), gum::prm::PRMFactory< GUM_SCALAR >::__retrieveInputs(), gum::prm::PRMFactory< GUM_SCALAR >::addAttribute(), and gum::prm::PRMFactory< GUM_SCALAR >::addNoisyOrCompound().
|
virtual |
See gum::prm::PRMClassElementContainer<GUM_SCALAR>::get(NodeId).
Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.
Definition at line 1035 of file PRMClass_tpl.h.
|
virtual |
See gum::prm::PRMClassElementContainer<GUM_SCALAR>::get(const std::string&).
Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.
Definition at line 1047 of file PRMClass_tpl.h.
|
virtual |
See gum::prm::PRMClassElementContainer<GUM_SCALAR>::get(const std::string&).
Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.
Definition at line 1059 of file PRMClass_tpl.h.
INLINE const Set< PRMInterface< GUM_SCALAR > *> & gum::prm::PRMClass< GUM_SCALAR >::implements | ( | ) | const |
Returns the Set of PRMInterface<GUM_SCALAR> implemented by this Class<GUM_SCALAR>.
NotFound | Raised if this Class<GUM_SCALAR> doesn't implement any PRMInterface<GUM_SCALAR>. |
Definition at line 1166 of file PRMClass_tpl.h.
Referenced by gum::prm::PRMFactory< GUM_SCALAR >::__checkInterfaceImplementation().
void gum::prm::PRMClass< GUM_SCALAR >::inheritAggregates | ( | ) |
Definition at line 223 of file PRMClass_tpl.h.
void gum::prm::PRMClass< GUM_SCALAR >::inheritAttributes | ( | ) |
Definition at line 194 of file PRMClass_tpl.h.
void gum::prm::PRMClass< GUM_SCALAR >::inheritParameters | ( | ) |
Definition at line 176 of file PRMClass_tpl.h.
void gum::prm::PRMClass< GUM_SCALAR >::inheritReferenceSlots | ( | ) |
Definition at line 149 of file PRMClass_tpl.h.
void gum::prm::PRMClass< GUM_SCALAR >::inheritSlotChains | ( | ) |
Definition at line 255 of file PRMClass_tpl.h.
void gum::prm::PRMClass< GUM_SCALAR >::initializeInheritance | ( | ) |
Definition at line 130 of file PRMClass_tpl.h.
INLINE bool gum::prm::PRMClass< GUM_SCALAR >::isCastDescendant | ( | const std::string & | safe_name | ) | const |
Return true if the attribute named safe_name is a cast descendant.
Cast descendant are automatically added PRMAttribute<GUM_SCALAR> for type casting.
safe_name | The safe name of an PRMAttribute<GUM_SCALAR> of this class. |
NotFound | Raised if safe_name does not name an PRMAttribute<GUM_SCALAR> in this Class<GUM_SCALAR>. |
Definition at line 1261 of file PRMClass_tpl.h.
Returns true if obj_ptr is of type Class.
Definition at line 99 of file PRMObject.h.
References gum::prm::PRMObject::CLASS, and gum::prm::PRMObject::obj_type().
Referenced by gum::prm::PRMFactory< GUM_SCALAR >::startAttribute().
|
virtualinherited |
Returns true if the node is an inner node.
PRMAttribute or PRMAggregate can either be input, output, both or internal nodes.
By defaut, attributes and aggregates are inner nodes.
elt | A PRMClassElement<GUM_SCALAR>. |
NotFound | Raised if NodeId does'nt match any PRMClassElement<GUM_SCALAR> in this. |
WrongClassElement | Raised if NodeId is neither an PRMAttribute nor an PRMAggregate. |
Definition at line 113 of file PRMClassElementContainer_tpl.h.
Referenced by gum::prm::SVE< GUM_SCALAR >::__initLiftedNodes().
|
virtualinherited |
Returns true if the node is an input node.
PRMAttribute or PRMAggregate can either be input, output, both or internal nodes.
By defaut, attributes and aggregates are inner nodes.
elt | A PRMClassElement<GUM_SCALAR>. |
Definition at line 69 of file PRMClassElementContainer_tpl.h.
Returns true if obj_ptr is of type PRMInstance.
Definition at line 109 of file PRMObject.h.
References gum::prm::PRMObject::INSTANCE, gum::prm::PRMObject::name(), gum::prm::PRMObject::obj_type(), gum::prm::PRMObject::operator!=(), gum::prm::PRMObject::operator=(), gum::prm::PRMObject::operator==(), gum::prm::PRMObject::PRMObject(), and gum::prm::PRMObject::~PRMObject().
Returns true if obj_ptr is of type PRMInterface.
Definition at line 104 of file PRMObject.h.
References gum::prm::PRMObject::obj_type(), and gum::prm::PRMObject::PRM_INTERFACE.
|
virtual |
Returns true if elt is an output node.
elt | A node of this class. |
Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.
Definition at line 1273 of file PRMClass_tpl.h.
Referenced by gum::prm::SVED< GUM_SCALAR >::__initLiftedNodes(), and gum::prm::SVE< GUM_SCALAR >::__initLiftedNodes().
|
virtual |
Test if this Class<GUM_SCALAR> is a subclass of cec.
If cec is a Class<GUM_SCALAR> then this Class<GUM_SCALAR> is a subclass of cec if they are equal or there exists a superclass of this Class<GUM_SCALAR> which is equal to cec.
If cec is an PRMInterface<GUM_SCALAR> then this Class<GUM_SCALAR> is a subclass of cec if it implements cec or if there exists a superclass of this Class<GUM_SCALAR> which implements cec.
cec | The PRMClassElementContainer<GUM_SCALAR> for which we determine if this Class<GUM_SCALAR> is a subclass of it. |
Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.
Definition at line 442 of file PRMClass_tpl.h.
|
virtualinherited |
Test if this PRMClassElementContainer is a super type of cec.
This returns cec.isSubTypeOf(*this).
cec |
Definition at line 121 of file PRMClassElementContainer_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 76 of file PRMObject.h.
Referenced by gum::prm::decomposePath(), gum::prm::PRMFormAttribute< GUM_SCALAR >::PRMFormAttribute(), and gum::prm::PRMScalarAttribute< GUM_SCALAR >::PRMScalarAttribute().
|
inherited |
Returns the name of this object.
Definition at line 32 of file PRMObject_inl.h.
References gum::prm::PRMObject::__name.
Referenced by gum::prm::SVE< GUM_SCALAR >::__addDelayedVariable(), gum::prm::PRMClass< double >::__addIOInterfaceFlags(), gum::prm::PRMFactory< GUM_SCALAR >::__addParent(), gum::prm::PRMInstance< GUM_SCALAR >::__addReferingInstance(), gum::prm::PRMClass< double >::__checkInterface(), gum::prm::PRMFactory< GUM_SCALAR >::__checkInterfaceImplementation(), gum::prm::PRMClass< double >::__checkInterfaces(), gum::prm::o3prm::O3ClassFactory< GUM_SCALAR >::__checkRawCPT(), gum::prm::PRMClass< double >::__checkRefInterface(), gum::prm::PRMClass< double >::__checkRefInterfaces(), gum::prm::o3prm::O3ClassFactory< GUM_SCALAR >::__checkRuleCPTSumsTo1(), gum::prm::PRMInstance< GUM_SCALAR >::__copyAggregates(), gum::prm::PRMInstance< GUM_SCALAR >::__copyAttribute(), gum::prm::PRMSlotChain< double >::__copyLastElt(), gum::prm::PRMSystem< double >::__groundAttr(), gum::prm::PRMSystem< double >::__groundPotential(), gum::prm::PRMSystem< double >::__groundRef(), gum::prm::PRMClass< double >::__inheritClass(), gum::prm::PRMInterface< double >::__overloadAttribute(), gum::prm::PRMClass< double >::__overloadAttribute(), gum::prm::PRMClass< double >::__overloadParameter(), gum::prm::PRMClass< double >::__overloadReference(), gum::prm::PRMInterface< double >::__overloadReferenceSlot(), gum::prm::__print_attribute__(), gum::prm::__print_instance__(), gum::prm::gspan::StrictSearch< GUM_SCALAR >::__str(), gum::prm::StructuredInference< GUM_SCALAR >::__str(), gum::prm::PRMInterface< double >::add(), gum::prm::PRMSystem< double >::add(), gum::prm::PRMClass< double >::add(), gum::prm::PRMFactory< GUM_SCALAR >::addAggregator(), gum::prm::PRMFormAttribute< GUM_SCALAR >::addParent(), gum::prm::PRMScalarAttribute< GUM_SCALAR >::addParent(), gum::prm::PRMFormAttribute< GUM_SCALAR >::copy(), gum::prm::PRMScalarAttribute< GUM_SCALAR >::copy(), gum::prm::o3prmr::O3prmrInterpreter::findAttributeName(), gum::prm::o3prmr::O3prmrInterpreter::findInstanceName(), gum::prm::PRMFormAttribute< GUM_SCALAR >::getCastDescendant(), gum::prm::PRMScalarAttribute< GUM_SCALAR >::getCastDescendant(), gum::prm::PRMClass< double >::inheritAggregates(), gum::prm::PRMClass< double >::isCastDescendant(), gum::prm::PRMObject::isInstance(), gum::prm::PRMObject::name(), gum::prm::PRMType::name(), gum::prm::PRMFormAttribute< GUM_SCALAR >::newFactory(), gum::prm::PRMScalarAttribute< GUM_SCALAR >::newFactory(), gum::prm::PRMType::operator!=(), gum::prm::PRMObject::operator!=(), operator<<(), gum::prm::PRMType::operator==(), gum::prm::PRMObject::operator==(), gum::prm::PRMClass< double >::overload(), gum::prm::PRMInterface< double >::overload(), gum::prm::PRMFormAttribute< GUM_SCALAR >::PRMFormAttribute(), gum::prm::PRMReferenceSlot< double >::PRMReferenceSlot(), gum::prm::PRMScalarAttribute< GUM_SCALAR >::PRMScalarAttribute(), gum::prm::PRMFactory< GUM_SCALAR >::startClass(), gum::prm::PRMFactory< GUM_SCALAR >::startInterface(), gum::prm::PRMFactory< GUM_SCALAR >::startSystem(), and gum::prm::PRMAggregate< double >::str2enum().
|
inherited |
Change the name of the PRM Object.
Definition at line 36 of file PRMObject_inl.h.
References gum::prm::PRMObject::__name, and gum::prm::PRMObject::name().
|
virtual |
Implementation of pure virtual method of PRMObject.
Implements gum::prm::PRMObject.
Definition at line 1010 of file PRMClass_tpl.h.
To PRMObject are equal if they have the same name (which is unique).
Definition at line 46 of file PRMObject_inl.h.
References gum::prm::PRMObject::__name, and gum::prm::PRMObject::name().
Referenced by gum::prm::PRMObject::isInstance().
|
delete |
Copy operator. Don't use it.
|
delete |
Move operator. Don't use it.
To PRMObject are equal if they have the same name (which is unique).
Definition at line 40 of file PRMObject_inl.h.
References gum::prm::PRMObject::__name, and gum::prm::PRMObject::name().
Referenced by gum::prm::PRMObject::isInstance().
|
virtual |
See gum::prm::PRMClassElementContainer<GUM_SCALAR>::operator[](NodeId).
Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.
Definition at line 1177 of file PRMClass_tpl.h.
|
virtual |
See gum::prm::PRMClassElementContainer<GUM_SCALAR>::operator[](NodeId).
Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.
Definition at line 1183 of file PRMClass_tpl.h.
|
virtual |
See gum::prm::PRMClassElementContainer<GUM_SCALAR>::operator[](const std::string&).
Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.
Definition at line 1189 of file PRMClass_tpl.h.
|
virtual |
See gum::prm::PRMClassElementContainer<GUM_SCALAR>::operator[](const std::string&).
Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.
Definition at line 1195 of file PRMClass_tpl.h.
|
virtual |
See gum::prm::overload(PRMClassElement<GUM_SCALAR>*).
Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.
Definition at line 730 of file PRMClass_tpl.h.
Referenced by gum::prm::PRMFactory< GUM_SCALAR >::addAggregator(), and gum::prm::PRMFactory< GUM_SCALAR >::startAggregator().
INLINE const Set< PRMParameter< GUM_SCALAR > *> & gum::prm::PRMClass< GUM_SCALAR >::parameters | ( | ) | const |
Returns the set of parameters of this Class<GUM_SCALAR>.
Definition at line 1077 of file PRMClass_tpl.h.
INLINE const Set< PRMReferenceSlot< GUM_SCALAR > *> & gum::prm::PRMClass< GUM_SCALAR >::referenceSlots | ( | ) | const |
Returns the set of PRMReferenceSlot<GUM_SCALAR> of this Class<GUM_SCALAR>.
Definition at line 1145 of file PRMClass_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 77 of file PRMObject.h.
Referenced by gum::prm::decomposePath(), gum::prm::PRMFormAttribute< GUM_SCALAR >::PRMFormAttribute(), and gum::prm::PRMScalarAttribute< GUM_SCALAR >::PRMScalarAttribute().
INLINE HashTable< std::string, const PRMParameter< GUM_SCALAR > *> gum::prm::PRMClass< GUM_SCALAR >::scope | ( | ) | const |
Returns all the parameters in the scope of this class.
&return all the parameters in the scope of this class.
Definition at line 1098 of file PRMClass_tpl.h.
Referenced by gum::prm::o3prm::O3ClassFactory< GUM_SCALAR >::__checkRawCPT(), and gum::prm::o3prm::O3ClassFactory< GUM_SCALAR >::__checkRuleCPT().
|
virtualinherited |
Set the input flag value of id at b.
PRMAttribute or PRMAggregate can either be input, output, both or internal nodes.
By defaut, attributes and aggregates are inner nodes.
elt | A PRMClassElement<GUM_SCALAR>. |
b | The flag value. |
NotFound | Raised if id does'nt match any PRMClassElement<GUM_SCALAR> in this. |
WrongClassElement | Raised if NodeId is neither an PRMAttribute nor an PRMAggregate. |
Definition at line 77 of file PRMClassElementContainer_tpl.h.
|
virtualinherited |
Set the output flag value of id at b.
PRMAttribute or PRMAggregate can either be input, output, both or internal nodes.
By defaut, attributes and aggregates are inner nodes.
elt | A PRMClassElement<GUM_SCALAR>. |
b | The flag value. |
NotFound | Raised if id does'nt match any PRMClassElement<GUM_SCALAR> in this. |
WrongClassElement | Raised if NodeId is neither an PRMAttribute nor an PRMAggregate. |
Definition at line 94 of file PRMClassElementContainer_tpl.h.
Referenced by gum::prm::PRMFactory< GUM_SCALAR >::__buildSlotChain().
INLINE const Set< PRMSlotChain< GUM_SCALAR > *> & gum::prm::PRMClass< GUM_SCALAR >::slotChains | ( | ) | const |
Returns the set of PRMSlotChain<GUM_SCALAR> of this Class<GUM_SCALAR>.
Definition at line 1151 of file PRMClass_tpl.h.
INLINE const PRMClass< GUM_SCALAR > & gum::prm::PRMClass< GUM_SCALAR >::super | ( | ) | const |
Returns the super Class<GUM_SCALAR> of this Class<GUM_SCALAR>.
NotFound | Raised if this has no super Class<GUM_SCALAR>. |
Definition at line 1156 of file PRMClass_tpl.h.
|
friend |
Definition at line 64 of file PRMClass.h.
|
private |
The sequence of aggregate.
Definition at line 362 of file PRMClass.h.
Referenced by gum::prm::PRMClass< double >::__inheritClass().
|
private |
The sequence of PRMAttribute<GUM_SCALAR>s.
Definition at line 356 of file PRMClass.h.
Referenced by gum::prm::PRMClass< double >::__inheritClass().
|
private |
The bijection between variables in super and variables in this The bijection's firsts are attributes in this and its seconds are attributes in c.
Definition at line 400 of file PRMClass.h.
|
private |
The dag representing dependencies between formal attributes and slots.
Definition at line 339 of file PRMClass.h.
|
private |
a dummy member used to fix a compilation issue in clang4
Definition at line 403 of file PRMClass.h.
|
private |
The set of Class<GUM_SCALAR> which are extension of this Class<GUM_SCALAR> (i.e. direct subtypes).
Definition at line 395 of file PRMClass.h.
|
private |
The Set of implemented interface of this.
Definition at line 391 of file PRMClass.h.
Referenced by gum::prm::PRMClass< double >::__inheritClass().
|
private |
Mapping between a member's name and itself. Used for fast access to a member given it's name.
Definition at line 353 of file PRMClass.h.
Referenced by gum::prm::PRMClass< double >::__inheritClass().
|
private |
Mapping between node's id and their name (being an attribute or a slot). Used for fast access to a member given it's node id.
Definition at line 343 of file PRMClass.h.
|
private |
The Set of parameters in this Class<GUM_SCALAR>.
Definition at line 368 of file PRMClass.h.
Referenced by gum::prm::PRMClass< double >::__inheritClass().
|
private |
The sequence of PRMReferenceSlot<GUM_SCALAR>.
Definition at line 359 of file PRMClass.h.
Referenced by gum::prm::PRMClass< double >::__inheritClass().
|
private |
The set of gum::PRMSlotChain<GUM_SCALAR>s.
Definition at line 365 of file PRMClass.h.
Referenced by gum::prm::PRMClass< double >::__inheritClass().
|
private |
The alternate PRMClassElementContainer<GUM_SCALAR> searched for elements defined in this. Note that this is first searched for gum::PRMClassElement<GUM_SCALAR>.
Definition at line 388 of file PRMClass.h.
Referenced by gum::prm::PRMClass< double >::isSubTypeOf().