![]() |
aGrUM 2.3.2
a C++ library for (probabilistic) graphical models
|
An PRMInterface is implemented by a Class<GUM_SCALAR> and defines a set of PRMReferenceSlot<GUM_SCALAR> and PRMAttribute<GUM_SCALAR> which the implementing Class<GUM_SCALAR> must contain. More...
#include <PRMInterface.h>
Public Member Functions | |
Constructor & destructor. | |
| PRMInterface (const std::string &name) | |
| Default constructor. | |
| PRMInterface (const std::string &name, PRMInterface< GUM_SCALAR > &super, bool delayInheritance=false) | |
| Constructor for building a subclass of super. | |
| PRMInterface (const PRMInterface< GUM_SCALAR > &source) | |
| Copy constructor. | |
| virtual | ~PRMInterface () |
| Destructor. | |
Graphical model getters and setters | |
| virtual PRMObject::prm_type | obj_type () const |
| Implementation of pure virtual method of PRMObject. | |
| virtual PRMClassElement< GUM_SCALAR > & | get (NodeId id) |
| See gum::prm::PRMClassElementContainer<GUM_SCALAR>::get(NodeId). | |
| virtual const PRMClassElement< GUM_SCALAR > & | get (NodeId id) const |
| Se gum::prm::PRMClassElementContainer<GUM_SCALAR>::get(NodeId). | |
| void | addArc (const std::string &tail, const std::string &head) |
| An Interfance doesn't have any arc, this will raise an OperationNotAllowed exception. | |
PRMClassElement<GUM_SCALAR> getters and setters | |
| virtual bool | isOutputNode (const PRMClassElement< GUM_SCALAR > &elt) const |
| See gum::prm::PRMClassElementContainer<GUM_SCALAR>::get(const
std::string&). | |
| virtual PRMClassElement< GUM_SCALAR > & | get (const std::string &name) |
| See gum::prm::PRMClassElementContainer<GUM_SCALAR>::get(const
std::string&). | |
| virtual const PRMClassElement< GUM_SCALAR > & | get (const std::string &name) const |
| See gum::prm::PRMClassElementContainer<GUM_SCALAR>::get(const
std::string&). | |
| const Set< PRMAttribute< GUM_SCALAR > * > & | attributes () const |
| Returns the set of PRMAttribute<GUM_SCALAR> of this Class<GUM_SCALAR>. | |
| const Set< PRMReferenceSlot< GUM_SCALAR > * > & | referenceSlots () const |
| Returns the set of PRMAggregate of this Class<GUM_SCALAR>. | |
| NodeId | add (PRMClassElement< GUM_SCALAR > *elt) |
| See gum::prm::PRMClassElementContainer<GUM_SCALAR>::add(PRMClassElement<GUM_SCALAR>*). | |
| NodeId | overload (PRMClassElement< GUM_SCALAR > *elt) |
| Add a new PRMClassElement<GUM_SCALAR> which overload an inherited PRMClassElement<GUM_SCALAR>. | |
Inheritance methods | |
| virtual bool | isSubTypeOf (const PRMClassElementContainer< GUM_SCALAR > &cec) const |
| Test if this PRMInterface is a sub PRMInterface of cec. | |
| PRMInterface< GUM_SCALAR > & | super () |
| Returns the superInterface of this PRMInterface. | |
| const PRMInterface< GUM_SCALAR > & | super () const |
| Returns the superInterface of this PRMInterface. | |
| Set< PRMClass< GUM_SCALAR > * > & | implementations () |
| Returns the set of Class<GUM_SCALAR> implementing this PRMInterface. | |
| const Set< PRMClass< GUM_SCALAR > * > & | implementations () const |
| Returns the set of Class<GUM_SCALAR> implementing this PRMInterface. | |
| void | inheritInterface () |
| Inherits from this interface super interface, this should only be done when this inteface inheritance was delayed. | |
Getters & setters operators | |
| PRMClassElement< GUM_SCALAR > & | operator[] (NodeId id) |
| See gum::prm::PRMClassElementContainer<GUM_SCALAR>::operator[](NodeId). | |
| const PRMClassElement< GUM_SCALAR > & | operator[] (NodeId id) const |
| See gum::prm::PRMClassElementContainer<GUM_SCALAR>::operator[](NodeId). | |
| PRMClassElement< GUM_SCALAR > & | operator[] (const std::string &name) |
| See gum::prm::PRMClassElementContainer<GUM_SCALAR>::operator[](const
std::string&). | |
| const PRMClassElement< GUM_SCALAR > & | operator[] (const std::string &name) const |
| See gum::prm::PRMClassElementContainer<GUM_SCALAR>::operator[](const
std::string&). | |
Getters on the gum::PRMClassElement<GUM_SCALAR>. | |
| virtual bool | belongsTo (const PRMClassElement< GUM_SCALAR > &elt) const |
| Returns true if elt belongs to this PRMClassElementContainer. | |
| 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. | |
| virtual bool | isInputNode (const PRMClassElement< GUM_SCALAR > &elt) const |
| Returns true if the node is an input node. | |
| virtual void | setInputNode (const PRMClassElement< GUM_SCALAR > &elt, bool b) |
| Set the input flag value of id at b. | |
| virtual void | setOutputNode (const PRMClassElement< GUM_SCALAR > &elt, bool b) |
| Set the output flag value of id at b. | |
| virtual bool | isInnerNode (const PRMClassElement< GUM_SCALAR > &elt) const |
| Returns true if the node is an inner node. | |
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. | |
| virtual const DAG & | containerDag () const |
| Returns the gum::DAG of this PRMClassElementContainer. | |
Inheritance getters and setters | |
| virtual bool | isSuperTypeOf (const PRMClassElementContainer< GUM_SCALAR > &cec) const |
| Test if this PRMClassElementContainer is a super type of cec. | |
Getters & setters. | |
| const std::string & | name () const |
| Returns the name of this object. | |
| void | name (const std::string &name) |
| Change the name of the PRM Object. | |
Operators | |
| bool | operator== (const PRMObject &obj) const |
| To PRMObject are equal if they have the same name (which is unique). | |
| bool | operator!= (const PRMObject &obj) const |
| To PRMObject are equal if they have the same name (which is unique). | |
Protected Member Functions | |
| const DAG & | dag_ () const |
| Returns a constant reference over this PRMInterface's DAG. | |
| DAG & | dag_ () |
| Returns a non constant reference over this PRMInterface's DAG. | |
| void | findAllSubtypes_ (Set< PRMClassElementContainer< GUM_SCALAR > * > &set) |
| Fills set with all the subtypes of this PRMInterface, this includes extensions and implementations. | |
| void | updateDescendants_ (const PRMClassElement< GUM_SCALAR > &elt) |
| See gum::prm::PRMClassElementContainer<GUM_SCALAR>(const
PRMClassElement<GUM_SCALAR>&). | |
| virtual std::pair< bool, bool > & | getIOFlag_ (const PRMClassElement< GUM_SCALAR > &elt) |
| Returns the IO flags of a PRMClassElement<GUM_SCALAR>. | |
| virtual const std::pair< bool, bool > & | getIOFlag_ (const PRMClassElement< GUM_SCALAR > &elt) const |
| Returns the IO flags of a PRMClassElement<GUM_SCALAR>. | |
| virtual void | setIOFlag_ (const PRMClassElement< GUM_SCALAR > &elt, const std::pair< bool, bool > &flags) |
| Defines the IO flags of a PRMClassElement<GUM_SCALAR>. | |
| virtual void | copyIOFlags_ (const PRMClassElementContainer< GUM_SCALAR > &c) |
| Copy the IO Flags of c in this PRMClassElementContainer. | |
Private Member Functions | |
| PRMInterface< GUM_SCALAR > & | operator= (const PRMInterface< GUM_SCALAR > &source) |
| Copy operator. Don't use it. | |
| void | _inheritInterface_ (const PRMInterface< GUM_SCALAR > &i) |
| Proceed with the copy of i in this. | |
Private Attributes | |
| HashTable< std::string, std::pair< bool, bool > > | _IOFlags_ |
| input / output flags, useful when inheriting or copying. | |
Graphical model members | |
| DAG | _dag_ |
| The dag representing dependencies between formal attributes and slots. | |
| NodeProperty< PRMClassElement< GUM_SCALAR > * > | _nodeIdMap_ |
| 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. | |
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. | |
| Set< PRMAttribute< GUM_SCALAR > * > | _attributes_ |
| The sequence of PRMAttribute<GUM_SCALAR>s. | |
| Set< PRMReferenceSlot< GUM_SCALAR > * > | _referenceSlots_ |
| The sequence of PRMReferenceSlot<GUM_SCALAR>. | |
Private members. | |
| std::string | _name_ |
Friends | |
| class | PRMClass< GUM_SCALAR > |
Iterators | |
| using | ClassEltIterator = typename NodeProperty< PRMClassElement< GUM_SCALAR >* >::iterator |
| using | const_ClassEltIterator |
| ClassEltIterator | begin () |
| const ClassEltIterator & | end () |
| const_ClassEltIterator | begin () const |
| const const_ClassEltIterator & | end () const |
Built-in types. | |
| enum class | prm_type : char { ALL , CLASS , PRM_INTERFACE , CLASS_ELT , TYPE , SYSTEM , 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. | |
| static std::string | RIGHT_CAST () |
| Enumeration of the different types of objects handled by a PRM. | |
| static std::string | enum2str (prm_type type) |
| Returns the string representation of a PRMObject. | |
| static INLINE bool | isClass (const PRMObject &obj) |
| Returns true if obj_ptr is of type Class. | |
| static INLINE bool | isInterface (const PRMObject &obj) |
| Returns true if obj_ptr is of type PRMInterface. | |
| static INLINE bool | isInstance (const PRMObject &obj) |
| Returns true if obj_ptr is of type PRMInstance. | |
Inheritance members | |
| PRMInterface< GUM_SCALAR > * | _superInterface_ |
| The alternate PRMClassElementContainer<GUM_SCALAR> searched for elements defined in this. Note that this is first searched for gum::PRMClassElement<GUM_SCALAR>. | |
| Set< PRMClass< GUM_SCALAR > * > | _implementations_ |
| The set of Class<GUM_SCALAR> which implements this PRMInterface. | |
| Set< PRMInterface< GUM_SCALAR > * > | _extensions_ |
| The set of Class<GUM_SCALAR> which implements this PRMInterface. | |
| void | _addImplementation_ (PRMClass< GUM_SCALAR > *c) |
| Add an Class<GUM_SCALAR> to the set of Class<GUM_SCALAR> which implements this PRMInterface. | |
| void | _addExtension_ (PRMInterface< GUM_SCALAR > *c) |
| Add an Class<GUM_SCALAR> to the set of Class<GUM_SCALAR> which implements this PRMInterface. | |
| bool | _checkOverloadLegality_ (const PRMClassElement< GUM_SCALAR > *overloaded, const PRMClassElement< GUM_SCALAR > *overloader) |
| The alternate PRMClassElementContainer<GUM_SCALAR> searched for elements defined in this. Note that this is first searched for gum::PRMClassElement<GUM_SCALAR>. | |
| void | _overloadAttribute_ (PRMAttribute< GUM_SCALAR > *overloader, PRMAttribute< GUM_SCALAR > *overloaded) |
| The alternate PRMClassElementContainer<GUM_SCALAR> searched for elements defined in this. Note that this is first searched for gum::PRMClassElement<GUM_SCALAR>. | |
| void | _overloadReferenceSlot_ (PRMReferenceSlot< GUM_SCALAR > *overloader, PRMReferenceSlot< GUM_SCALAR > *overloaded) |
| The alternate PRMClassElementContainer<GUM_SCALAR> searched for elements defined in this. Note that this is first searched for gum::PRMClassElement<GUM_SCALAR>. | |
| void | _addCastDescendants_ (PRMAttribute< GUM_SCALAR > *start, PRMAttribute< GUM_SCALAR > *end) |
| The alternate PRMClassElementContainer<GUM_SCALAR> searched for elements defined in this. Note that this is first searched for gum::PRMClassElement<GUM_SCALAR>. | |
An PRMInterface is implemented by a Class<GUM_SCALAR> and defines a set of PRMReferenceSlot<GUM_SCALAR> and PRMAttribute<GUM_SCALAR> which the implementing Class<GUM_SCALAR> must contain.
Definition at line 80 of file PRMInterface.h.
| using gum::prm::PRMInterface< GUM_SCALAR >::ClassEltIterator = typename NodeProperty< PRMClassElement< GUM_SCALAR >* >::iterator |
Definition at line 295 of file PRMInterface.h.
| using gum::prm::PRMInterface< GUM_SCALAR >::const_ClassEltIterator |
Definition at line 299 of file PRMInterface.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 88 of file PRMObject.h.
|
explicit |
Default constructor.
| name | The interface name. |
Definition at line 56 of file PRMInterface_tpl.h.
References gum::prm::PRMClassElementContainer< GUM_SCALAR >::PRMClassElementContainer(), PRMInterface(), _superInterface_, and gum::prm::PRMObject::name().
Referenced by PRMInterface(), PRMInterface(), PRMInterface(), ~PRMInterface(), _addExtension_(), _inheritInterface_(), _overloadAttribute_(), operator=(), super(), and super().
| gum::prm::PRMInterface< GUM_SCALAR >::PRMInterface | ( | const std::string & | name, |
| PRMInterface< GUM_SCALAR > & | super, | ||
| bool | delayInheritance = false ) |
Constructor for building a subclass of super.
| name | The sub-interface name. |
| super | The super PRMInterface of this. |
| delayInheritance | If true, inheritance will be delayed. |
Definition at line 62 of file PRMInterface_tpl.h.
References gum::prm::PRMClassElementContainer< GUM_SCALAR >::PRMClassElementContainer(), PRMInterface(), _inheritInterface_(), _superInterface_, gum::prm::PRMObject::name(), and super().
| gum::prm::PRMInterface< GUM_SCALAR >::PRMInterface | ( | const PRMInterface< GUM_SCALAR > & | source | ) |
Copy constructor.
Definition at line 71 of file PRMInterface_tpl.h.
References gum::prm::PRMClassElementContainer< GUM_SCALAR >::PRMClassElementContainer(), PRMInterface(), _dag_, _superInterface_, GUM_ERROR, and gum::prm::PRMObject::name().
|
virtual |
Destructor.
Definition at line 79 of file PRMInterface_tpl.h.
References PRMInterface(), and _nodeIdMap_.
|
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 251 of file PRMInterface_tpl.h.
References end().
|
private |
Add an Class<GUM_SCALAR> to the set of Class<GUM_SCALAR> which implements this PRMInterface.
Definition at line 378 of file PRMInterface_tpl.h.
References PRMInterface(), and _extensions_.
|
private |
Add an Class<GUM_SCALAR> to the set of Class<GUM_SCALAR> which implements this PRMInterface.
Definition at line 373 of file PRMInterface_tpl.h.
References _implementations_, and PRMClass< GUM_SCALAR >.
|
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 273 of file PRMInterface_tpl.h.
|
private |
Proceed with the copy of i in this.
Definition at line 93 of file PRMInterface_tpl.h.
References PRMInterface().
Referenced by PRMInterface(), and inheritInterface().
|
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 209 of file PRMInterface_tpl.h.
References PRMInterface(), and _overloadAttribute_().
Referenced by _overloadAttribute_().
|
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 235 of file PRMInterface_tpl.h.
References _nameMap_, _nodeIdMap_, gum::prm::PRMClassElement< GUM_SCALAR >::id(), gum::prm::PRMObject::name(), and gum::prm::PRMClassElement< GUM_SCALAR >::setId().
|
virtual |
See gum::prm::PRMClassElementContainer<GUM_SCALAR>::add(PRMClassElement<GUM_SCALAR>*).
Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.
Definition at line 128 of file PRMInterface_tpl.h.
References _nameMap_, GUM_ERROR, gum::prm::PRMClassElement< GUM_SCALAR >::isAttribute(), and gum::prm::PRMObject::name().
|
virtual |
An Interfance doesn't have any arc, this will raise an OperationNotAllowed exception.
| tail | The tail of the added arc. |
| head | The head of the added arc. |
| OperationNotAllowed | Systematically throws an OperationNotAllowed. |
Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.
Definition at line 355 of file PRMInterface_tpl.h.
References GUM_ERROR.
| INLINE const Set< PRMAttribute< GUM_SCALAR > * > & gum::prm::PRMInterface< GUM_SCALAR >::attributes | ( | ) | const |
Returns the set of PRMAttribute<GUM_SCALAR> of this Class<GUM_SCALAR>.
Definition at line 459 of file PRMInterface_tpl.h.
References _attributes_.
| INLINE PRMInterface< GUM_SCALAR >::ClassEltIterator gum::prm::PRMInterface< GUM_SCALAR >::begin | ( | ) |
Definition at line 332 of file PRMInterface_tpl.h.
References _nodeIdMap_.
| INLINE PRMInterface< GUM_SCALAR >::const_ClassEltIterator gum::prm::PRMInterface< GUM_SCALAR >::begin | ( | ) | const |
Definition at line 344 of file PRMInterface_tpl.h.
References _nodeIdMap_.
|
virtualinherited |
Returns true if elt belongs to this PRMClassElementContainer.
| elt | A PRMClassElement<GUM_SCALAR>. |
Definition at line 190 of file PRMClassElementContainer_tpl.h.
References get(), and gum::prm::PRMClassElement< GUM_SCALAR >::safeName().
|
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 198 of file PRMClassElementContainer_tpl.h.
References dag_().
Referenced by gum::prm::ClassDependencyGraph< GUM_SCALAR >::_addArcs_(), gum::prm::ClassBayesNet< GUM_SCALAR >::_init_(), gum::prm::SVE< GUM_SCALAR >::_initLiftedNodes_(), gum::prm::SVED< GUM_SCALAR >::_initLiftedNodes_(), gum::prm::PRMClass< GUM_SCALAR >::_overloadReference_(), gum::prm::PRMFactory< GUM_SCALAR >::addAttribute(), gum::prm::PRMClass< GUM_SCALAR >::completeInheritance(), exists(), and gum::prm::PRMClassElementContainer< double >::isInputNode().
|
protectedvirtualinherited |
Copy the IO Flags of c in this PRMClassElementContainer.
| c | A PRMClassElementContainer. |
Definition at line 57 of file PRMClassElementContainer_tpl.h.
References PRMClassElementContainer(), _IOFlags_, get(), and setIOFlag_().
|
protectedvirtual |
Returns a non constant reference over this PRMInterface's DAG.
Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.
Definition at line 416 of file PRMInterface_tpl.h.
References _dag_.
|
protectedvirtual |
Returns a constant reference over this PRMInterface's DAG.
Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.
Definition at line 411 of file PRMInterface_tpl.h.
References _dag_.
| INLINE const PRMInterface< GUM_SCALAR >::ClassEltIterator & gum::prm::PRMInterface< GUM_SCALAR >::end | ( | ) |
Definition at line 338 of file PRMInterface_tpl.h.
References _nodeIdMap_.
Referenced by _addCastDescendants_().
| INLINE const PRMInterface< GUM_SCALAR >::const_ClassEltIterator & gum::prm::PRMInterface< GUM_SCALAR >::end | ( | ) | const |
Definition at line 350 of file PRMInterface_tpl.h.
References _nodeIdMap_.
|
inlinestaticinherited |
Returns the string representation of a PRMObject.
Definition at line 95 of file PRMObject.h.
References CLASS, CLASS_ELT, INSTANCE, PRM_INTERFACE, SYSTEM, and 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 182 of file PRMClassElementContainer_tpl.h.
References get(), and gum::prm::PRMObject::name().
Referenced by gum::prm::PRMClass< GUM_SCALAR >::_checkInterface_(), 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::PRMClass< GUM_SCALAR >::overload(), gum::prm::PRMInterface< GUM_SCALAR >::overload(), setInputNode(), setOutputNode(), 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 177 of file PRMClassElementContainer_tpl.h.
References containerDag().
|
protectedvirtual |
Fills set with all the subtypes of this PRMInterface, this includes extensions and implementations.
Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.
Definition at line 481 of file PRMInterface_tpl.h.
References gum::prm::PRMClassElementContainer< GUM_SCALAR >::PRMClassElementContainer(), _extensions_, and _implementations_.
|
virtual |
See gum::prm::PRMClassElementContainer<GUM_SCALAR>::get(const std::string&).
Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.
Definition at line 439 of file PRMInterface_tpl.h.
References _nameMap_, GUM_ERROR, and gum::prm::PRMObject::name().
|
virtual |
See gum::prm::PRMClassElementContainer<GUM_SCALAR>::get(const std::string&).
Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.
Definition at line 449 of file PRMInterface_tpl.h.
References _nameMap_, GUM_ERROR, and gum::prm::PRMObject::name().
|
virtual |
See gum::prm::PRMClassElementContainer<GUM_SCALAR>::get(NodeId).
Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.
Definition at line 421 of file PRMInterface_tpl.h.
References _nodeIdMap_, and GUM_ERROR.
Referenced by gum::prm::PRMClass< GUM_SCALAR >::_checkInterface_(), gum::prm::PRMClass< GUM_SCALAR >::_checkRefInterface_(), and operator[]().
|
virtual |
Se gum::prm::PRMClassElementContainer<GUM_SCALAR>::get(NodeId).
Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.
Definition at line 430 of file PRMInterface_tpl.h.
References _nodeIdMap_, and GUM_ERROR.
|
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 148 of file PRMClassElementContainer_tpl.h.
References _IOFlags_, GUM_ERROR, and gum::prm::PRMClassElement< GUM_SCALAR >::safeName().
Referenced by gum::prm::PRMClass< GUM_SCALAR >::_addIOInterfaceFlags_(), isInnerNode(), gum::prm::PRMClass< GUM_SCALAR >::isOutputNode(), gum::prm::PRMInterface< GUM_SCALAR >::isOutputNode(), and setOutputNode().
|
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 158 of file PRMClassElementContainer_tpl.h.
References _IOFlags_, GUM_ERROR, and gum::prm::PRMClassElement< GUM_SCALAR >::safeName().
| INLINE Set< PRMClass< GUM_SCALAR > * > & gum::prm::PRMInterface< GUM_SCALAR >::implementations | ( | ) |
Returns the set of Class<GUM_SCALAR> implementing this PRMInterface.
Definition at line 470 of file PRMInterface_tpl.h.
References _implementations_.
| INLINE const Set< PRMClass< GUM_SCALAR > * > & gum::prm::PRMInterface< GUM_SCALAR >::implementations | ( | ) | const |
Returns the set of Class<GUM_SCALAR> implementing this PRMInterface.
Definition at line 476 of file PRMInterface_tpl.h.
References _implementations_.
| void gum::prm::PRMInterface< GUM_SCALAR >::inheritInterface | ( | ) |
Inherits from this interface super interface, this should only be done when this inteface inheritance was delayed.
Definition at line 88 of file PRMInterface_tpl.h.
References _inheritInterface_(), and _superInterface_.
Returns true if obj_ptr is of type Class.
Definition at line 114 of file PRMObject.h.
References PRMObject(), CLASS, and obj_type().
Referenced by gum::prm::PRMClass< GUM_SCALAR >::scope(), and 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 134 of file PRMClassElementContainer_tpl.h.
References getIOFlag_().
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 90 of file PRMClassElementContainer_tpl.h.
Returns true if obj_ptr is of type PRMInstance.
Definition at line 122 of file PRMObject.h.
References PRMObject(), INSTANCE, and obj_type().
Returns true if obj_ptr is of type PRMInterface.
Definition at line 117 of file PRMObject.h.
References PRMObject(), obj_type(), and PRM_INTERFACE.
|
virtual |
See gum::prm::PRMClassElementContainer<GUM_SCALAR>::get(const std::string&).
Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.
Definition at line 496 of file PRMInterface_tpl.h.
References _implementations_, _superInterface_, gum::prm::PRMClassElementContainer< GUM_SCALAR >::getIOFlag_(), and isOutputNode().
Referenced by isOutputNode().
|
virtual |
Test if this PRMInterface is a sub PRMInterface of cec.
PRMInterface can not be a sub PRMInterface of a Class<GUM_SCALAR>, so if cec is a Class<GUM_SCALAR> this method will return false.
If cec is an PRMInterface then this PRMInterface is a sub PRMInterface of cec if they are equal or there exists a super PRMInterface of this PRMInterface which is equal to cec.
| cec | The PRMClassElementContainer<GUM_SCALAR> for which we determine if this PRMInterface is a sub PRMInterface of it. |
Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.
Definition at line 291 of file PRMInterface_tpl.h.
References gum::prm::PRMClassElementContainer< GUM_SCALAR >::PRMClassElementContainer(), gum::prm::PRMObject::CLASS, and gum::prm::PRMObject::obj_type().
|
virtualinherited |
Test if this PRMClassElementContainer is a super type of cec.
This returns cec.isSubTypeOf(*this).
| cec |
Definition at line 142 of file PRMClassElementContainer_tpl.h.
References PRMClassElementContainer(), and isSubTypeOf().
|
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 90 of file PRMObject.h.
Referenced by gum::prm::PRMAggregate< GUM_SCALAR >::PRMAggregate(), gum::prm::PRMAggregate< GUM_SCALAR >::PRMAggregate(), gum::prm::PRMFormAttribute< GUM_SCALAR >::PRMFormAttribute(), gum::prm::PRMReferenceSlot< GUM_SCALAR >::PRMReferenceSlot(), gum::prm::PRMScalarAttribute< GUM_SCALAR >::PRMScalarAttribute(), gum::prm::PRMSlotChain< GUM_SCALAR >::PRMSlotChain(), gum::prm::PRMClassElement< GUM_SCALAR >::cast(), and gum::prm::decomposePath().
|
inherited |
Returns the name of this object.
Definition at line 54 of file PRMObject_inl.h.
References _name_.
Referenced by gum::prm::PRMAggregate< GUM_SCALAR >::PRMAggregate(), gum::prm::PRMAggregate< GUM_SCALAR >::PRMAggregate(), gum::prm::PRMAttribute< GUM_SCALAR >::PRMAttribute(), gum::prm::PRMClass< GUM_SCALAR >::PRMClass(), gum::prm::PRMClass< GUM_SCALAR >::PRMClass(), gum::prm::PRMClass< GUM_SCALAR >::PRMClass(), gum::prm::PRMClass< GUM_SCALAR >::PRMClass(), gum::prm::PRMClassElement< GUM_SCALAR >::PRMClassElement(), gum::prm::PRMClassElement< GUM_SCALAR >::PRMClassElement(), gum::prm::PRMClassElementContainer< GUM_SCALAR >::PRMClassElementContainer(), gum::prm::PRMFormAttribute< GUM_SCALAR >::PRMFormAttribute(), gum::prm::PRMFormAttribute< GUM_SCALAR >::PRMFormAttribute(), gum::prm::PRMFuncAttribute< GUM_SCALAR >::PRMFuncAttribute(), gum::prm::PRMInstance< GUM_SCALAR >::PRMInstance(), gum::prm::PRMInterface< GUM_SCALAR >::PRMInterface(), gum::prm::PRMInterface< GUM_SCALAR >::PRMInterface(), gum::prm::PRMInterface< GUM_SCALAR >::PRMInterface(), PRMObject(), gum::prm::PRMParameter< GUM_SCALAR >::PRMParameter(), gum::prm::PRMParameter< GUM_SCALAR >::PRMParameter(), gum::prm::PRMReferenceSlot< GUM_SCALAR >::PRMReferenceSlot(), gum::prm::PRMScalarAttribute< GUM_SCALAR >::PRMScalarAttribute(), gum::prm::PRMSlotChain< GUM_SCALAR >::PRMSlotChain(), gum::prm::PRMSlotChain< GUM_SCALAR >::PRMSlotChain(), gum::prm::PRMSlotChain< GUM_SCALAR >::PRMSlotChain(), gum::prm::PRMSlotChain< double >::PRMSlotChain(), gum::prm::PRMSystem< GUM_SCALAR >::PRMSystem(), gum::prm::__print_attribute__(), gum::prm::__print_instance__(), gum::prm::SVE< GUM_SCALAR >::_addDelayedVariable_(), gum::prm::PRMClass< GUM_SCALAR >::_addIOInterfaceFlags_(), gum::prm::PRMFactory< GUM_SCALAR >::_addParent_(), gum::prm::PRMInstance< GUM_SCALAR >::_addReferingInstance_(), gum::prm::PRMClass< GUM_SCALAR >::_checkInterface_(), gum::prm::PRMFactory< GUM_SCALAR >::_checkInterfaceImplementation_(), gum::prm::PRMClass< GUM_SCALAR >::_checkInterfaces_(), gum::prm::o3prm::O3ClassFactory< GUM_SCALAR >::_checkRawCPT_(), gum::prm::PRMClass< GUM_SCALAR >::_checkRefInterface_(), gum::prm::PRMClass< GUM_SCALAR >::_checkRefInterfaces_(), gum::prm::o3prm::O3ClassFactory< GUM_SCALAR >::_checkRuleCPTSumsTo1_(), gum::prm::PRMInstance< GUM_SCALAR >::_copyAggregates_(), gum::prm::PRMInstance< GUM_SCALAR >::_copyAttribute_(), gum::prm::PRMSystem< GUM_SCALAR >::_groundAgg_(), gum::prm::PRMSystem< double >::_groundAgg_(), gum::prm::PRMSystem< GUM_SCALAR >::_groundRef_(), gum::prm::PRMSystem< double >::_groundTensor_(), gum::prm::PRMClass< GUM_SCALAR >::_overloadAttribute_(), gum::prm::PRMClass< GUM_SCALAR >::_overloadParameter_(), gum::prm::PRMClass< GUM_SCALAR >::_overloadReference_(), gum::prm::PRMInterface< GUM_SCALAR >::_overloadReferenceSlot_(), gum::prm::gspan::StrictSearch< GUM_SCALAR >::_str_(), gum::prm::gspan::StrictSearch< GUM_SCALAR >::_str_(), gum::prm::gspan::StrictSearch< GUM_SCALAR >::_str_(), gum::prm::StructuredInference< GUM_SCALAR >::_str_(), gum::prm::StructuredInference< GUM_SCALAR >::_str_(), gum::prm::StructuredInference< GUM_SCALAR >::_str_(), gum::prm::PRMClass< GUM_SCALAR >::add(), gum::prm::PRMInterface< GUM_SCALAR >::add(), gum::prm::PRMSystem< GUM_SCALAR >::add(), gum::prm::PRMFactory< GUM_SCALAR >::addAggregator(), gum::prm::PRMFormAttribute< GUM_SCALAR >::addParent(), gum::prm::PRMScalarAttribute< GUM_SCALAR >::addParent(), gum::prm::PRMClassElement< GUM_SCALAR >::cast(), gum::prm::PRMClass< GUM_SCALAR >::completeInheritance(), gum::prm::PRMFormAttribute< GUM_SCALAR >::copy(), gum::prm::PRMScalarAttribute< GUM_SCALAR >::copy(), gum::prm::PRMClassElementContainer< GUM_SCALAR >::exists(), gum::prm::PRMInstance< GUM_SCALAR >::exists(), gum::prm::PRMSystem< GUM_SCALAR >::exists(), gum::prm::o3prmr::O3prmrInterpreter::findAttributeName(), gum::prm::o3prmr::O3prmrInterpreter::findInstanceName(), gum::prm::PRMClass< GUM_SCALAR >::get(), gum::prm::PRMClass< GUM_SCALAR >::get(), gum::prm::PRMClassElementContainer< GUM_SCALAR >::get(), gum::prm::PRMClassElementContainer< GUM_SCALAR >::get(), gum::prm::PRMInstance< GUM_SCALAR >::get(), gum::prm::PRMInstance< GUM_SCALAR >::get(), gum::prm::PRMInterface< GUM_SCALAR >::get(), gum::prm::PRMInterface< GUM_SCALAR >::get(), gum::prm::PRMSystem< GUM_SCALAR >::get(), gum::prm::PRMSystem< GUM_SCALAR >::get(), gum::prm::PRMSystem< GUM_SCALAR >::getArray(), gum::prm::PRMSystem< GUM_SCALAR >::getArrayType(), gum::prm::PRMSystem< GUM_SCALAR >::getArrayType(), gum::prm::PRMFormAttribute< GUM_SCALAR >::getCastDescendant(), gum::prm::PRMScalarAttribute< GUM_SCALAR >::getCastDescendant(), gum::prm::PRMSystem< GUM_SCALAR >::groundedBN(), gum::prm::PRMClass< GUM_SCALAR >::inheritAggregates(), gum::prm::PRMSystem< double >::instantiate(), gum::prm::PRMSystem< GUM_SCALAR >::isArray(), gum::prm::PRMClass< GUM_SCALAR >::isCastDescendant(), gum::prm::PRMSystem< GUM_SCALAR >::isInstance(), name(), gum::prm::PRMType::name(), gum::prm::PRMFormAttribute< GUM_SCALAR >::newFactory(), gum::prm::PRMScalarAttribute< GUM_SCALAR >::newFactory(), operator!=(), gum::prm::PRMClass< GUM_SCALAR >::operator=(), operator==(), gum::prm::PRMType::operator==(), gum::prm::PRMClass< GUM_SCALAR >::operator[](), gum::prm::PRMClass< GUM_SCALAR >::operator[](), gum::prm::PRMClassElementContainer< GUM_SCALAR >::operator[](), gum::prm::PRMClassElementContainer< GUM_SCALAR >::operator[](), gum::prm::PRMInterface< GUM_SCALAR >::operator[](), gum::prm::PRMClass< GUM_SCALAR >::overload(), gum::prm::PRMInterface< GUM_SCALAR >::overload(), gum::prm::PRMClassElementContainer< GUM_SCALAR >::PRMClassElementContainterConstIterator, gum::prm::PRMClassElementContainer< GUM_SCALAR >::setInputNode(), gum::prm::PRMClassElementContainer< GUM_SCALAR >::setOutputNode(), gum::prm::PRMFactory< GUM_SCALAR >::startClass(), gum::prm::PRMFactory< GUM_SCALAR >::startInterface(), and gum::prm::PRMFactory< GUM_SCALAR >::startSystem().
|
inherited |
|
virtual |
Implementation of pure virtual method of PRMObject.
Implements gum::prm::PRMObject.
Definition at line 406 of file PRMInterface_tpl.h.
References gum::prm::PRMObject::PRM_INTERFACE.
To PRMObject are equal if they have the same name (which is unique).
Definition at line 66 of file PRMObject_inl.h.
References PRMObject(), _name_, and name().
|
private |
To PRMObject are equal if they have the same name (which is unique).
Definition at line 62 of file PRMObject_inl.h.
References PRMObject(), _name_, and name().
|
virtual |
See gum::prm::PRMClassElementContainer<GUM_SCALAR>::operator[](const std::string&).
Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.
Definition at line 395 of file PRMInterface_tpl.h.
|
virtual |
See gum::prm::PRMClassElementContainer<GUM_SCALAR>::operator[](const std::string&).
Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.
Definition at line 401 of file PRMInterface_tpl.h.
References get(), and gum::prm::PRMObject::name().
|
virtual |
See gum::prm::PRMClassElementContainer<GUM_SCALAR>::operator[](NodeId).
Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.
Definition at line 383 of file PRMInterface_tpl.h.
|
virtual |
See gum::prm::PRMClassElementContainer<GUM_SCALAR>::operator[](NodeId).
Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.
Definition at line 389 of file PRMInterface_tpl.h.
|
virtual |
Add a new PRMClassElement<GUM_SCALAR> which overload an inherited PRMClassElement<GUM_SCALAR>.
The pointer is "given" to this class, which will delete it when ~Class<GUM_SCALAR>() is called.
The NodeId of elt is defined when it is added to this, discarding any previous value. There is no garanty that elt will have the same NodeId than the PRMClassElement<GUM_SCALAR> it overloaded.
You can only overload inherited PRMClassElement<GUM_SCALAR> and only if elt is a subtype of the inherited PRMClassElement<GUM_SCALAR>. You do not define dependencies in an PRMInterface so it is useless to overload an PRMAttribute<GUM_SCALAR> with another sharing the same type, and if tried it will raise an OperationNotAllowed exception.
| elt | The new PRMClassElement<GUM_SCALAR> overloading an inherited PRMClassElement<GUM_SCALAR> in this. |
| NotFound | Raised if no overloaded PRMClassElement<GUM_SCALAR> is found. |
| OperationNotAllowed | Raised if the overloading is impossible. |
Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.
Definition at line 166 of file PRMInterface_tpl.h.
References gum::prm::PRMClassElementContainer< GUM_SCALAR >::exists(), GUM_ERROR, gum::prm::PRMObject::name(), and super().
| INLINE const Set< PRMReferenceSlot< GUM_SCALAR > * > & gum::prm::PRMInterface< GUM_SCALAR >::referenceSlots | ( | ) | const |
Returns the set of PRMAggregate of this Class<GUM_SCALAR>.
Definition at line 465 of file PRMInterface_tpl.h.
References _referenceSlots_.
|
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 92 of file PRMObject.h.
Referenced by gum::prm::PRMAggregate< GUM_SCALAR >::PRMAggregate(), gum::prm::PRMAggregate< GUM_SCALAR >::PRMAggregate(), gum::prm::PRMFormAttribute< GUM_SCALAR >::PRMFormAttribute(), gum::prm::PRMReferenceSlot< GUM_SCALAR >::PRMReferenceSlot(), gum::prm::PRMScalarAttribute< GUM_SCALAR >::PRMScalarAttribute(), gum::prm::PRMSlotChain< GUM_SCALAR >::PRMSlotChain(), gum::prm::PRMClassElement< GUM_SCALAR >::cast(), and gum::prm::decomposePath().
|
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 98 of file PRMClassElementContainer_tpl.h.
References exists(), GUM_ERROR, gum::prm::PRMClassElement< GUM_SCALAR >::isAggregate(), gum::prm::PRMClassElement< GUM_SCALAR >::isAttribute(), gum::prm::PRMObject::name(), and gum::prm::PRMClassElement< GUM_SCALAR >::safeName().
Referenced by gum::prm::PRMClass< GUM_SCALAR >::addArc().
|
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 169 of file PRMClassElementContainer_tpl.h.
References _IOFlags_, and gum::prm::PRMClassElement< GUM_SCALAR >::safeName().
Referenced by gum::prm::PRMClass< GUM_SCALAR >::_addIOInterfaceFlags_(), copyIOFlags_(), and setOutputNode().
|
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 114 of file PRMClassElementContainer_tpl.h.
References exists(), getIOFlag_(), GUM_ERROR, gum::prm::PRMClassElement< GUM_SCALAR >::isAggregate(), gum::prm::PRMClassElement< GUM_SCALAR >::isAttribute(), gum::prm::PRMObject::name(), gum::prm::PRMClassElement< GUM_SCALAR >::safeName(), setIOFlag_(), and updateDescendants_().
Referenced by gum::prm::PRMFactory< GUM_SCALAR >::_buildSlotChain_().
| INLINE PRMInterface< GUM_SCALAR > & gum::prm::PRMInterface< GUM_SCALAR >::super | ( | ) |
Returns the superInterface of this PRMInterface.
| NotFound | Raised if this has no super PRMInterface. |
Definition at line 361 of file PRMInterface_tpl.h.
References PRMInterface(), _superInterface_, and GUM_ERROR.
Referenced by PRMInterface(), and overload().
| INLINE const PRMInterface< GUM_SCALAR > & gum::prm::PRMInterface< GUM_SCALAR >::super | ( | ) | const |
Returns the superInterface of this PRMInterface.
| NotFound | Raised if this has no super PRMInterface. |
Definition at line 367 of file PRMInterface_tpl.h.
References PRMInterface(), _superInterface_, and GUM_ERROR.
|
protectedvirtual |
See gum::prm::PRMClassElementContainer<GUM_SCALAR>(const PRMClassElement<GUM_SCALAR>&).
Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.
Definition at line 317 of file PRMInterface_tpl.h.
Definition at line 402 of file PRMInterface.h.
Referenced by _addImplementation_().
|
private |
The sequence of PRMAttribute<GUM_SCALAR>s.
Definition at line 353 of file PRMInterface.h.
Referenced by attributes().
|
private |
The dag representing dependencies between formal attributes and slots.
Definition at line 336 of file PRMInterface.h.
Referenced by PRMInterface(), dag_(), and dag_().
|
private |
The set of Class<GUM_SCALAR> which implements this PRMInterface.
Definition at line 379 of file PRMInterface.h.
Referenced by _addExtension_(), and findAllSubtypes_().
|
private |
The set of Class<GUM_SCALAR> which implements this PRMInterface.
Definition at line 371 of file PRMInterface.h.
Referenced by _addImplementation_(), findAllSubtypes_(), implementations(), implementations(), and isOutputNode().
|
privateinherited |
input / output flags, useful when inheriting or copying.
Definition at line 451 of file PRMClassElementContainer.h.
Referenced by copyIOFlags_(), getIOFlag_(), getIOFlag_(), and setIOFlag_().
|
privateinherited |
Definition at line 211 of file PRMObject.h.
Referenced by PRMObject(), PRMObject(), PRMObject(), name(), name(), operator!=(), operator=(), operator=(), and operator==().
|
private |
Mapping between a member's name and itself. Used for fast access to a member given it's name.
Definition at line 350 of file PRMInterface.h.
Referenced by gum::prm::PRMInterface< double >::PRMInterface(), _overloadReferenceSlot_(), add(), get(), and get().
|
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 340 of file PRMInterface.h.
Referenced by ~PRMInterface(), _overloadReferenceSlot_(), begin(), begin(), end(), end(), get(), and get().
|
private |
The sequence of PRMReferenceSlot<GUM_SCALAR>.
Definition at line 356 of file PRMInterface.h.
Referenced by referenceSlots().
|
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 368 of file PRMInterface.h.
Referenced by PRMInterface(), PRMInterface(), PRMInterface(), gum::prm::PRMInterface< double >::end(), inheritInterface(), isOutputNode(), super(), and super().