![]() |
aGrUM 2.3.2
a C++ library for (probabilistic) graphical models
|
A PRMSystem is a container of PRMInstance and describe a relational skeleton. More...
#include <PRMSystem.h>
Public Member Functions | |
Constructors & destructor. | |
| PRMSystem (const std::string &name) | |
| Default constructor. | |
| virtual | ~PRMSystem () |
| Destructor. | |
Getters & setters over the relational skeleton. | |
| const DiGraph & | skeleton () const |
| Returns the relation skeleton of this PRMSystem. | |
| PRMInstance< GUM_SCALAR > & | get (NodeId id) |
| Returns an PRMInstance given it's NodeId in the relational skeleton. | |
| const PRMInstance< GUM_SCALAR > & | get (NodeId id) const |
| Returns an PRMInstance given it's NodeId in the relational skeleton. | |
| NodeId | get (const PRMInstance< GUM_SCALAR > &i) const |
| Returns the relation skeleton of this PRMSystem. | |
Getters & setters over PRMInstance and array of PRMInstance. | |
| virtual PRMObject::prm_type | obj_type () const |
| Returns the PRM type of this object. | |
| Size | size () const |
| Returns the number of PRMInstance in this PRMSystem. | |
| bool | exists (const std::string &name) const |
| Retruns true either if name is an instance or an array in this PRMSystem. | |
| bool | isInstantiated (const PRMClass< GUM_SCALAR > &c) const |
| Returns true if the given Class<GUM_SCALAR> has at least one PRMInstance in this PRMSystem. | |
| bool | isInstance (const std::string &name) const |
| Returns true if an PRMInstance with the given name exists. | |
| bool | isArray (const std::string &name) const |
| Returns true if an array with the given name exists. | |
| void | groundedBN (BayesNetFactory< GUM_SCALAR > &factory) const |
| Returns the grounded Bayesian network of this system. | |
| void | instantiate () |
| Instantiate all the PRMInstance in this PRMSystem. | |
PRMInstance handling. | |
| PRMInstance< GUM_SCALAR > & | get (const std::string &name) |
| Returns a reference over an PRMInstance given it's name. | |
| const PRMInstance< GUM_SCALAR > & | get (const std::string &name) const |
| Returns a constant reference over an PRMInstance given it's name. | |
| const Set< PRMInstance< GUM_SCALAR > * > & | get (const PRMClass< GUM_SCALAR > &type) const |
| Returns the sequence of all instances of the given type. | |
| NodeId | add (PRMInstance< GUM_SCALAR > *i) |
| Add an PRMInstance to this system. | |
Array handling. | |
| const Sequence< PRMInstance< GUM_SCALAR > * > & | getArray (const std::string &name) const |
| Returns the sequence of instances of a given array. | |
| PRMClassElementContainer< GUM_SCALAR > & | getArrayType (const std::string &name) |
| Returns the type of the given array. | |
| const PRMClassElementContainer< GUM_SCALAR > & | getArrayType (const std::string &name) const |
| Returns the type of the given array. | |
| NodeId | add (const std::string &array, PRMInstance< GUM_SCALAR > *i) |
| Add an PRMInstance to an array in this system. If the array doesn't exists it is created. | |
| NodeId | add (const std::string &array, PRMInstance< GUM_SCALAR > &i) |
| Add an PRMInstance to an array in this system. If the array doesn't exists it is created. | |
| void | addArray (const std::string &array, PRMClassElementContainer< GUM_SCALAR > &type) |
| Add an array of instances in this system. If the array doesn't exists it is created. | |
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 | |
| PRMSystem (const PRMSystem< GUM_SCALAR > &from) | |
| Copy constructor. Don't use it. | |
| PRMSystem< GUM_SCALAR > & | operator= (const PRMSystem< GUM_SCALAR > &from)=delete |
| Copy operator. Don't use it. | |
Ground BN private methods. | |
| void | _groundRef_ (const PRMInstance< GUM_SCALAR > &instance, BayesNetFactory< GUM_SCALAR > &factory) const |
| Method which ground PRMReferenceSlot of an PRMInstance and add arcs in the IBayesNet. | |
| void | _groundAttr_ (const PRMInstance< GUM_SCALAR > &instance, BayesNetFactory< GUM_SCALAR > &factory) const |
| Method which ground Atttributes and Aggregators of an PRMInstance. | |
| void | _groundTensor_ (const PRMInstance< GUM_SCALAR > &instance, const PRMAttribute< GUM_SCALAR > &attr, BayesNetFactory< GUM_SCALAR > &factory) const |
| Method which copy node's Tensor of an PRMInstance to the grounded Bayesian network. | |
| void | _groundAgg_ (const PRMClassElement< GUM_SCALAR > &elt, const std::string &name, BayesNetFactory< GUM_SCALAR > &factory) const |
| Ground an aggregator with the given name in the grounded IBayesNet. | |
Private Attributes | |
Private members. | |
| std::string | _name_ |
Iterators. | |
| using | iterator = typename NodeProperty< PRMInstance< GUM_SCALAR >* >::iterator |
| Iterator over the PRMInstance of this PRMSystem. | |
| using | const_iterator = typename NodeProperty< PRMInstance< GUM_SCALAR >* >::const_iterator |
| Constant Iterator over the PRMInstance of this PRMSystem. | |
| using | array_iterator = typename Sequence< PRMInstance< GUM_SCALAR >* >::iterator |
| Iterator over the PRMInstance in an array in this PRMSystem. | |
| using | const_array_iterator = typename Sequence< PRMInstance< GUM_SCALAR >* >::const_iterator |
| Iterator over the PRMInstance in an array in this PRMSystem. | |
| iterator | begin () |
| Returns an iterator over the instances in this system. | |
| const iterator & | end () |
| Returns a iterator at the end of the set of PRMInstance in this PRMSystem. | |
| const_iterator | begin () const |
| Returns a constant iterator over the instances in this system. | |
| const const_iterator & | end () const |
| Returns a constant iterator at the end of the set of PRMInstance in this PRMSystem. | |
| array_iterator | begin (const std::string &a) |
| Returns an iterator at the beginning of the Sequence of PRMInstance in the array named a;. | |
| const array_iterator & | end (const std::string &a) |
| Returns an iterator at the end of the Sequence of PRMInstance in the array named a. | |
| const_array_iterator | begin (const std::string &a) const |
| Returns an iterator at the beginning of the Sequence of PRMInstance in the array named a;. | |
| const const_array_iterator & | end (const std::string &a) const |
| Returns an iterator at the end of the Sequence of PRMInstance in the array named a. | |
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. | |
Private PRMInstance handling methods and members. | |
| using | model_pair |
| Type for the pair of a Class<GUM_SCALAR> and the sequence of it's instantiation. | |
| DiGraph | skeleton_ |
| The relational skeleton of this PRMSystem. | |
| NodeProperty< PRMInstance< GUM_SCALAR > * > | nodeIdMap_ |
| The mapping between PRMInstance and their NodeId in the relational skeleton of this PRMSystem. | |
| HashTable< std::string, PRMInstance< GUM_SCALAR > * > | nameMap_ |
| The mapping between PRMInstance and their names. | |
| HashTable< PRMClass< GUM_SCALAR > *, Set< PRMInstance< GUM_SCALAR > * > * > | instanceMap_ |
| Mapping between a class and all it's PRMInstance in this system. | |
| HashTable< std::string, model_pair > | arrayMap_ |
| Mapping between arrays and their name. The first element of the pair is the type of the array. | |
A PRMSystem is a container of PRMInstance and describe a relational skeleton.
Definition at line 70 of file PRMSystem.h.
| using gum::prm::PRMSystem< GUM_SCALAR >::array_iterator = typename Sequence< PRMInstance< GUM_SCALAR >* >::iterator |
Iterator over the PRMInstance in an array in this PRMSystem.
Definition at line 234 of file PRMSystem.h.
| using gum::prm::PRMSystem< GUM_SCALAR >::const_array_iterator = typename Sequence< PRMInstance< GUM_SCALAR >* >::const_iterator |
Iterator over the PRMInstance in an array in this PRMSystem.
Definition at line 247 of file PRMSystem.h.
| using gum::prm::PRMSystem< GUM_SCALAR >::const_iterator = typename NodeProperty< PRMInstance< GUM_SCALAR >* >::const_iterator |
Constant Iterator over the PRMInstance of this PRMSystem.
Definition at line 224 of file PRMSystem.h.
| using gum::prm::PRMSystem< GUM_SCALAR >::iterator = typename NodeProperty< PRMInstance< GUM_SCALAR >* >::iterator |
Iterator over the PRMInstance of this PRMSystem.
Definition at line 214 of file PRMSystem.h.
|
protected |
Type for the pair of a Class<GUM_SCALAR> and the sequence of it's instantiation.
Definition at line 288 of file PRMSystem.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.
Definition at line 60 of file PRMSystem_tpl.h.
References gum::prm::PRMObject::PRMObject(), PRMSystem(), and gum::prm::PRMObject::name().
Referenced by PRMSystem(), PRMSystem(), ~PRMSystem(), and operator=().
|
virtual |
Destructor.
Definition at line 65 of file PRMSystem_tpl.h.
References PRMSystem(), arrayMap_, and instanceMap_.
|
protected |
Copy constructor. Don't use it.
Definition at line 79 of file PRMSystem_tpl.h.
References gum::prm::PRMObject::PRMObject(), PRMSystem(), nodeIdMap_, and skeleton_.
|
protected |
Ground an aggregator with the given name in the grounded IBayesNet.
| elt | The aggregator grounded. |
| name | The aggregator's name in the grounded IBayesNet. |
| factory | The factory used to build the grounded IBayesNet. |
Definition at line 159 of file PRMSystem_tpl.h.
References gum::prm::PRMObject::name(), gum::BayesNetFactory< GUM_SCALAR >::startVariableDeclaration(), and gum::BayesNetFactory< GUM_SCALAR >::variableName().
|
protected |
Method which ground Atttributes and Aggregators of an PRMInstance.
| instance | The PRMInstance grounded by this method. |
| factory | The factory used to build the grounded IBayesNet. |
Definition at line 124 of file PRMSystem_tpl.h.
References gum::prm::PRMInstance< GUM_SCALAR >::type().
Referenced by groundedBN().
|
protected |
Method which ground PRMReferenceSlot of an PRMInstance and add arcs in the IBayesNet.
| instance | The PRMInstance grounded by this method. |
| factory | The factory used to build the grounded IBayesNet. |
Definition at line 270 of file PRMSystem_tpl.h.
References gum::BayesNetFactory< GUM_SCALAR >::addParent(), gum::prm::PRMInstance< GUM_SCALAR >::get(), get(), gum::prm::PRMInstance< GUM_SCALAR >::getInstances(), gum::prm::PRMClassElement< GUM_SCALAR >::id(), gum::prm::PRMSlotChain< GUM_SCALAR >::lastElt(), gum::prm::PRMObject::name(), gum::prm::PRMClassElement< GUM_SCALAR >::prm_aggregate, gum::prm::PRMClassElement< GUM_SCALAR >::prm_attribute, gum::prm::PRMClassElement< GUM_SCALAR >::prm_slotchain, gum::prm::PRMClassElement< GUM_SCALAR >::safeName(), gum::BayesNetFactory< GUM_SCALAR >::startParentsDeclaration(), and gum::prm::PRMInstance< GUM_SCALAR >::type().
|
protected |
Method which copy node's Tensor of an PRMInstance to the grounded Bayesian network.
| instance | The PRMInstance currently grounded. |
| attr | The PRMAttribute<GUM_SCALAR> for which the Tensor is grounded. |
| factory | The factory used to build the grounded IBayesNet. |
Definition at line 323 of file PRMSystem_tpl.h.
| INLINE NodeId gum::prm::PRMSystem< GUM_SCALAR >::add | ( | const std::string & | array, |
| PRMInstance< GUM_SCALAR > & | i ) |
Add an PRMInstance to an array in this system. If the array doesn't exists it is created.
| PRMTypeError | Raised if i is not of the good type. |
| DuplicateElement | Raised if an PRMInstance with same name already exists. |
Definition at line 376 of file PRMSystem_tpl.h.
References add().
| INLINE NodeId gum::prm::PRMSystem< GUM_SCALAR >::add | ( | const std::string & | array, |
| PRMInstance< GUM_SCALAR > * | i ) |
Add an PRMInstance to an array in this system. If the array doesn't exists it is created.
| PRMTypeError | Raised if i is not of the good type. |
| DuplicateElement | Raised if an PRMInstance with same name already exists. |
Definition at line 501 of file PRMSystem_tpl.h.
References add(), arrayMap_, GUM_ERROR, and gum::prm::PRMInstance< GUM_SCALAR >::type().
| NodeId gum::prm::PRMSystem< GUM_SCALAR >::add | ( | PRMInstance< GUM_SCALAR > * | i | ) |
Add an PRMInstance to this system.
| DuplicateElement | Raised if an PRMInstance with the same name already exists. |
Definition at line 86 of file PRMSystem_tpl.h.
References GUM_ERROR, gum::prm::PRMObject::name(), and nameMap_.
Referenced by add(), add(), gum::prm::PRMFactory< GUM_SCALAR >::addArray(), gum::prm::PRMFactory< GUM_SCALAR >::incArray(), and gum::O3prmBNReader< GUM_SCALAR >::proceed().
| INLINE void gum::prm::PRMSystem< GUM_SCALAR >::addArray | ( | const std::string & | array, |
| PRMClassElementContainer< GUM_SCALAR > & | type ) |
Add an array of instances in this system. If the array doesn't exists it is created.
| DuplicateElement | Raised if an existing array with the same name already exists. |
Definition at line 517 of file PRMSystem_tpl.h.
References arrayMap_, and GUM_ERROR.
Referenced by gum::prm::PRMFactory< GUM_SCALAR >::addArray().
| INLINE PRMSystem< GUM_SCALAR >::iterator gum::prm::PRMSystem< GUM_SCALAR >::begin | ( | ) |
Returns an iterator over the instances in this system.
Definition at line 529 of file PRMSystem_tpl.h.
References nodeIdMap_.
Referenced by gum::prm::gspan::InterfaceGraph< GUM_SCALAR >::InterfaceGraph(), groundedBN(), and instantiate().
| INLINE PRMSystem< GUM_SCALAR >::const_iterator gum::prm::PRMSystem< GUM_SCALAR >::begin | ( | ) | const |
Returns a constant iterator over the instances in this system.
Definition at line 539 of file PRMSystem_tpl.h.
References nodeIdMap_.
| INLINE PRMSystem< GUM_SCALAR >::array_iterator gum::prm::PRMSystem< GUM_SCALAR >::begin | ( | const std::string & | a | ) |
Returns an iterator at the beginning of the Sequence of PRMInstance in the array named a;.
| NotFound | Raised if no array matches a. |
Definition at line 551 of file PRMSystem_tpl.h.
| INLINE PRMSystem< GUM_SCALAR >::const_array_iterator gum::prm::PRMSystem< GUM_SCALAR >::begin | ( | const std::string & | a | ) | const |
Returns an iterator at the beginning of the Sequence of PRMInstance in the array named a;.
| NotFound | Raised if no array matches a. |
Definition at line 567 of file PRMSystem_tpl.h.
| INLINE const PRMSystem< GUM_SCALAR >::iterator & gum::prm::PRMSystem< GUM_SCALAR >::end | ( | ) |
Returns a iterator at the end of the set of PRMInstance in this PRMSystem.
Definition at line 534 of file PRMSystem_tpl.h.
References nodeIdMap_.
Referenced by gum::prm::gspan::InterfaceGraph< GUM_SCALAR >::InterfaceGraph(), groundedBN(), and instantiate().
| INLINE const PRMSystem< GUM_SCALAR >::const_iterator & gum::prm::PRMSystem< GUM_SCALAR >::end | ( | ) | const |
Returns a constant iterator at the end of the set of PRMInstance in this PRMSystem.
Definition at line 545 of file PRMSystem_tpl.h.
References nodeIdMap_.
| INLINE const PRMSystem< GUM_SCALAR >::array_iterator & gum::prm::PRMSystem< GUM_SCALAR >::end | ( | const std::string & | a | ) |
Returns an iterator at the end of the Sequence of PRMInstance in the array named a.
| NotFound | Raised if no array matches a. |
Definition at line 559 of file PRMSystem_tpl.h.
| INLINE const PRMSystem< GUM_SCALAR >::const_array_iterator & gum::prm::PRMSystem< GUM_SCALAR >::end | ( | const std::string & | a | ) | const |
Returns an iterator at the end of the Sequence of PRMInstance in the array named a.
| NotFound | Raised if no array matches a. |
Definition at line 575 of file PRMSystem_tpl.h.
|
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<<().
| INLINE bool gum::prm::PRMSystem< GUM_SCALAR >::exists | ( | const std::string & | name | ) | const |
Retruns true either if name is an instance or an array in this PRMSystem.
Definition at line 582 of file PRMSystem_tpl.h.
References arrayMap_, gum::prm::PRMObject::name(), and nameMap_.
Referenced by gum::prm::o3prmr::O3prmrInterpreter::findInstanceName().
| INLINE const Set< PRMInstance< GUM_SCALAR > * > & gum::prm::PRMSystem< GUM_SCALAR >::get | ( | const PRMClass< GUM_SCALAR > & | type | ) | const |
Returns the sequence of all instances of the given type.
| NotFound | Raised if there is instantiation of type. |
Definition at line 467 of file PRMSystem_tpl.h.
References GUM_ERROR, and instanceMap_.
| INLINE NodeId gum::prm::PRMSystem< GUM_SCALAR >::get | ( | const PRMInstance< GUM_SCALAR > & | i | ) | const |
Returns the relation skeleton of this PRMSystem.
Definition at line 405 of file PRMSystem_tpl.h.
References GUM_ERROR, and nodeIdMap_.
| INLINE PRMInstance< GUM_SCALAR > & gum::prm::PRMSystem< GUM_SCALAR >::get | ( | const std::string & | name | ) |
Returns a reference over an PRMInstance given it's name.
| NotFound | Raised if the no PRMInstance matches name. |
Definition at line 446 of file PRMSystem_tpl.h.
References GUM_ERROR, gum::prm::PRMObject::name(), and nameMap_.
| INLINE const PRMInstance< GUM_SCALAR > & gum::prm::PRMSystem< GUM_SCALAR >::get | ( | const std::string & | name | ) | const |
Returns a constant reference over an PRMInstance given it's name.
| NotFound | Raised if the no PRMInstance matches name. |
Definition at line 456 of file PRMSystem_tpl.h.
References GUM_ERROR, gum::prm::PRMObject::name(), and nameMap_.
| INLINE PRMInstance< GUM_SCALAR > & gum::prm::PRMSystem< GUM_SCALAR >::get | ( | NodeId | id | ) |
Returns an PRMInstance given it's NodeId in the relational skeleton.
| NotFound | Raised if no PRMInstance matches the given NodeId. |
Definition at line 387 of file PRMSystem_tpl.h.
References GUM_ERROR, and nodeIdMap_.
Referenced by _groundRef_(), gum::prm::o3prmr::O3prmrInterpreter::checkObserve(), gum::prm::o3prmr::O3prmrInterpreter::checkQuery(), gum::prm::o3prmr::O3prmrInterpreter::checkUnobserve(), and gum::prm::PRMFactory< GUM_SCALAR >::incArray().
| INLINE const PRMInstance< GUM_SCALAR > & gum::prm::PRMSystem< GUM_SCALAR >::get | ( | NodeId | id | ) | const |
Returns an PRMInstance given it's NodeId in the relational skeleton.
| NotFound | Raised if no PRMInstance matches the given NodeId. |
Definition at line 396 of file PRMSystem_tpl.h.
References GUM_ERROR, and nodeIdMap_.
| INLINE const Sequence< PRMInstance< GUM_SCALAR > * > & gum::prm::PRMSystem< GUM_SCALAR >::getArray | ( | const std::string & | name | ) | const |
Returns the sequence of instances of a given array.
| NotFound | Raised if no array matches name. |
Definition at line 478 of file PRMSystem_tpl.h.
References arrayMap_, GUM_ERROR, and gum::prm::PRMObject::name().
| INLINE PRMClassElementContainer< GUM_SCALAR > & gum::prm::PRMSystem< GUM_SCALAR >::getArrayType | ( | const std::string & | name | ) |
Returns the type of the given array.
| NotFound | Raised if no array matches name. |
Definition at line 486 of file PRMSystem_tpl.h.
References arrayMap_, GUM_ERROR, and gum::prm::PRMObject::name().
| INLINE const PRMClassElementContainer< GUM_SCALAR > & gum::prm::PRMSystem< GUM_SCALAR >::getArrayType | ( | const std::string & | name | ) | const |
Returns the type of the given array.
| NotFound | Raised if no array matches name. |
Definition at line 494 of file PRMSystem_tpl.h.
References arrayMap_, GUM_ERROR, and gum::prm::PRMObject::name().
| void gum::prm::PRMSystem< GUM_SCALAR >::groundedBN | ( | BayesNetFactory< GUM_SCALAR > & | factory | ) | const |
Returns the grounded Bayesian network of this system.
| factory | The factory used to build the grounded Bayesian network. |
Definition at line 107 of file PRMSystem_tpl.h.
References _groundAttr_(), gum::BayesNetFactory< GUM_SCALAR >::addNetworkProperty(), begin(), end(), gum::BayesNetFactory< GUM_SCALAR >::endNetworkDeclaration(), gum::prm::PRMObject::name(), and gum::BayesNetFactory< GUM_SCALAR >::startNetworkDeclaration().
Referenced by gum::O3prmBNReader< GUM_SCALAR >::_generateBN_(), and gum::prm::o3prmr::O3prmrInterpreter::generateInfEngine().
| INLINE void gum::prm::PRMSystem< GUM_SCALAR >::instantiate | ( | ) |
Instantiate all the PRMInstance in this PRMSystem.
Definition at line 439 of file PRMSystem_tpl.h.
References begin(), and end().
Referenced by gum::O3prmBNReader< GUM_SCALAR >::_generateBN_(), and gum::prm::PRMFactory< GUM_SCALAR >::endSystem().
| INLINE bool gum::prm::PRMSystem< GUM_SCALAR >::isArray | ( | const std::string & | name | ) | const |
Returns true if an array with the given name exists.
Definition at line 434 of file PRMSystem_tpl.h.
References arrayMap_, and gum::prm::PRMObject::name().
Referenced by gum::prm::PRMFactory< GUM_SCALAR >::incArray(), and gum::prm::PRMFactory< GUM_SCALAR >::isArrayInCurrentSystem().
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().
Returns true if obj_ptr is of type PRMInstance.
Definition at line 122 of file PRMObject.h.
References PRMObject(), INSTANCE, and obj_type().
| INLINE bool gum::prm::PRMSystem< GUM_SCALAR >::isInstance | ( | const std::string & | name | ) | const |
Returns true if an PRMInstance with the given name exists.
Definition at line 429 of file PRMSystem_tpl.h.
References gum::prm::PRMObject::name(), and nameMap_.
Referenced by gum::prm::PRMFactory< GUM_SCALAR >::incArray().
| INLINE bool gum::prm::PRMSystem< GUM_SCALAR >::isInstantiated | ( | const PRMClass< GUM_SCALAR > & | c | ) | const |
Returns true if the given Class<GUM_SCALAR> has at least one PRMInstance in this PRMSystem.
Definition at line 424 of file PRMSystem_tpl.h.
References instanceMap_.
Returns true if obj_ptr is of type PRMInterface.
Definition at line 117 of file PRMObject.h.
References PRMObject(), obj_type(), and PRM_INTERFACE.
|
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 |
Returns the PRM type of this object.
Implements gum::prm::PRMObject.
Definition at line 414 of file PRMSystem_tpl.h.
References gum::prm::PRMObject::SYSTEM.
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().
|
protecteddelete |
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().
|
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().
| INLINE Size gum::prm::PRMSystem< GUM_SCALAR >::size | ( | ) | const |
Returns the number of PRMInstance in this PRMSystem.
Definition at line 419 of file PRMSystem_tpl.h.
References nodeIdMap_.
| INLINE const DiGraph & gum::prm::PRMSystem< GUM_SCALAR >::skeleton | ( | ) | const |
Returns the relation skeleton of this PRMSystem.
Definition at line 382 of file PRMSystem_tpl.h.
References skeleton_.
|
privateinherited |
Definition at line 211 of file PRMObject.h.
Referenced by PRMObject(), PRMObject(), PRMObject(), name(), name(), operator!=(), operator=(), operator=(), and operator==().
|
protected |
Mapping between arrays and their name. The first element of the pair is the type of the array.
Definition at line 293 of file PRMSystem.h.
Referenced by ~PRMSystem(), add(), addArray(), begin(), begin(), end(), end(), exists(), getArray(), getArrayType(), getArrayType(), and isArray().
|
protected |
Mapping between a class and all it's PRMInstance in this system.
Definition at line 284 of file PRMSystem.h.
Referenced by ~PRMSystem(), get(), and isInstantiated().
|
protected |
The mapping between PRMInstance and their names.
Definition at line 281 of file PRMSystem.h.
Referenced by add(), exists(), get(), get(), and isInstance().
|
protected |
The mapping between PRMInstance and their NodeId in the relational skeleton of this PRMSystem.
Definition at line 278 of file PRMSystem.h.
Referenced by PRMSystem(), begin(), begin(), end(), end(), get(), get(), get(), and size().
|
protected |
The relational skeleton of this PRMSystem.
Definition at line 274 of file PRMSystem.h.
Referenced by PRMSystem(), and skeleton().