![]() |
aGrUM 3.0.0
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 (std::string_view name) | |
| Default constructor. | |
| ~PRMSystem () override | |
| 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. | |
| PRMObject::prm_type | obj_type () const override |
| Returns the PRM type of this object. | |
| Size | size () const |
| Returns the number of PRMInstance in this PRMSystem. | |
| bool | exists (std::string_view 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 (std::string_view name) const |
| Returns true if an PRMInstance with the given name exists. | |
| bool | isArray (std::string_view 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 (std::string_view name) |
| Returns a reference over an PRMInstance given it's name. | |
| const PRMInstance< GUM_SCALAR > & | get (std::string_view 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 (std::string_view name) const |
| Returns the sequence of instances of a given array. | |
| PRMClassElementContainer< GUM_SCALAR > & | getArrayType (std::string_view name) |
| Returns the type of the given array. | |
| const PRMClassElementContainer< GUM_SCALAR > & | getArrayType (std::string_view name) const |
| Returns the type of the given array. | |
| NodeId | add (std::string_view 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 (std::string_view 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 (std::string_view 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 (std::string_view 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, std::string_view 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 an 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 (std::string_view a) |
| Returns an iterator at the beginning of the Sequence of PRMInstance in the array named a;. | |
| const array_iterator & | end (std::string_view a) |
| Returns an iterator at the end of the Sequence of PRMInstance in the array named a. | |
| const_array_iterator | begin (std::string_view a) const |
| Returns an iterator at the beginning of the Sequence of PRMInstance in the array named a;. | |
| const const_array_iterator & | end (std::string_view 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 72 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 236 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 249 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 226 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 216 of file PRMSystem.h.
|
protected |
Type for the pair of a Class<GUM_SCALAR> and the sequence of it's instantiation.
Definition at line 290 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 90 of file PRMObject.h.
|
explicit |
Default constructor.
Definition at line 61 of file PRMSystem_tpl.h.
References gum::prm::PRMObject::PRMObject(), PRMSystem(), and gum::prm::PRMObject::name().
Referenced by PRMSystem(), PRMSystem(), ~PRMSystem(), and operator=().
|
override |
Destructor.
Definition at line 66 of file PRMSystem_tpl.h.
References PRMSystem(), arrayMap_, and instanceMap_.
|
protected |
Copy constructor. Don't use it.
Definition at line 80 of file PRMSystem_tpl.h.
References gum::prm::PRMObject::PRMObject(), PRMSystem(), arrayMap_, instanceMap_, nameMap_, 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(), gum::prm::PRMClassElement< GUM_SCALAR >::type(), gum::prm::PRMType::variable(), 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 125 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 319 of file PRMSystem_tpl.h.
References gum::BijectionImplementation< T1, T2, Gen >::insert(), gum::prm::PRMObject::name(), gum::prm::PRMClassElement< GUM_SCALAR >::safeName(), gum::prm::PRMAttribute< GUM_SCALAR >::type(), gum::BayesNetFactory< GUM_SCALAR >::variable(), and gum::prm::PRMType::variable().
| 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 87 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().
| NodeId gum::prm::PRMSystem< GUM_SCALAR >::add | ( | std::string_view | 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 372 of file PRMSystem_tpl.h.
References add().
| NodeId gum::prm::PRMSystem< GUM_SCALAR >::add | ( | std::string_view | 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 485 of file PRMSystem_tpl.h.
References add(), arrayMap_, GUM_ERROR, and gum::prm::PRMInstance< GUM_SCALAR >::type().
| void gum::prm::PRMSystem< GUM_SCALAR >::addArray | ( | std::string_view | 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 500 of file PRMSystem_tpl.h.
References arrayMap_, and GUM_ERROR.
Referenced by gum::prm::PRMFactory< GUM_SCALAR >::addArray().
| PRMSystem< GUM_SCALAR >::iterator gum::prm::PRMSystem< GUM_SCALAR >::begin | ( | ) |
Returns an iterator over the instances in this system.
Definition at line 512 of file PRMSystem_tpl.h.
References nodeIdMap_.
Referenced by gum::prm::gspan::InterfaceGraph< GUM_SCALAR >::InterfaceGraph(), groundedBN(), and instantiate().
| 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 522 of file PRMSystem_tpl.h.
References nodeIdMap_.
| PRMSystem< GUM_SCALAR >::array_iterator gum::prm::PRMSystem< GUM_SCALAR >::begin | ( | std::string_view | 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 533 of file PRMSystem_tpl.h.
| PRMSystem< GUM_SCALAR >::const_array_iterator gum::prm::PRMSystem< GUM_SCALAR >::begin | ( | std::string_view | 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 549 of file PRMSystem_tpl.h.
| const PRMSystem< GUM_SCALAR >::iterator & gum::prm::PRMSystem< GUM_SCALAR >::end | ( | ) |
Returns an iterator at the end of the set of PRMInstance in this PRMSystem.
Definition at line 517 of file PRMSystem_tpl.h.
References nodeIdMap_.
Referenced by gum::prm::gspan::InterfaceGraph< GUM_SCALAR >::InterfaceGraph(), groundedBN(), and instantiate().
| 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 527 of file PRMSystem_tpl.h.
References nodeIdMap_.
| const PRMSystem< GUM_SCALAR >::array_iterator & gum::prm::PRMSystem< GUM_SCALAR >::end | ( | std::string_view | 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 541 of file PRMSystem_tpl.h.
| const PRMSystem< GUM_SCALAR >::const_array_iterator & gum::prm::PRMSystem< GUM_SCALAR >::end | ( | std::string_view | 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 557 of file PRMSystem_tpl.h.
|
staticinherited |
Returns the string representation of a PRMObject.
Definition at line 75 of file PRMObject_inl.h.
References CLASS, CLASS_ELT, INSTANCE, PRM_INTERFACE, SYSTEM, and TYPE.
Referenced by gum::prm::operator<<().
| bool gum::prm::PRMSystem< GUM_SCALAR >::exists | ( | std::string_view | name | ) | const |
Retruns true either if name is an instance or an array in this PRMSystem.
Definition at line 564 of file PRMSystem_tpl.h.
References arrayMap_, gum::prm::PRMObject::name(), and nameMap_.
Referenced by gum::prm::o3prmr::O3prmrInterpreter::findInstanceName().
| 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 453 of file PRMSystem_tpl.h.
References GUM_ERROR, and instanceMap_.
| NodeId gum::prm::PRMSystem< GUM_SCALAR >::get | ( | const PRMInstance< GUM_SCALAR > & | i | ) | const |
Returns the relation skeleton of this PRMSystem.
Definition at line 396 of file PRMSystem_tpl.h.
References GUM_ERROR, and nodeIdMap_.
| 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 382 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().
| 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 389 of file PRMSystem_tpl.h.
References GUM_ERROR, and nodeIdMap_.
| PRMInstance< GUM_SCALAR > & gum::prm::PRMSystem< GUM_SCALAR >::get | ( | std::string_view | name | ) |
Returns a reference over an PRMInstance given it's name.
| NotFound | Raised if the no PRMInstance matches name. |
Definition at line 437 of file PRMSystem_tpl.h.
References GUM_ERROR, gum::prm::PRMObject::name(), and nameMap_.
| const PRMInstance< GUM_SCALAR > & gum::prm::PRMSystem< GUM_SCALAR >::get | ( | std::string_view | name | ) | const |
Returns a constant reference over an PRMInstance given it's name.
| NotFound | Raised if the no PRMInstance matches name. |
Definition at line 444 of file PRMSystem_tpl.h.
References GUM_ERROR, gum::prm::PRMObject::name(), and nameMap_.
| const Sequence< PRMInstance< GUM_SCALAR > * > & gum::prm::PRMSystem< GUM_SCALAR >::getArray | ( | std::string_view | name | ) | const |
Returns the sequence of instances of a given array.
| NotFound | Raised if no array matches name. |
Definition at line 462 of file PRMSystem_tpl.h.
References arrayMap_, GUM_ERROR, and gum::prm::PRMObject::name().
| PRMClassElementContainer< GUM_SCALAR > & gum::prm::PRMSystem< GUM_SCALAR >::getArrayType | ( | std::string_view | name | ) |
Returns the type of the given array.
| NotFound | Raised if no array matches name. |
Definition at line 470 of file PRMSystem_tpl.h.
References arrayMap_, GUM_ERROR, and gum::prm::PRMObject::name().
| const PRMClassElementContainer< GUM_SCALAR > & gum::prm::PRMSystem< GUM_SCALAR >::getArrayType | ( | std::string_view | name | ) | const |
Returns the type of the 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().
| 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 108 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().
| void gum::prm::PRMSystem< GUM_SCALAR >::instantiate | ( | ) |
Instantiate all the PRMInstance in this PRMSystem.
Definition at line 430 of file PRMSystem_tpl.h.
References begin(), and end().
Referenced by gum::O3prmBNReader< GUM_SCALAR >::_generateBN_(), and gum::prm::PRMFactory< GUM_SCALAR >::endSystem().
| bool gum::prm::PRMSystem< GUM_SCALAR >::isArray | ( | std::string_view | name | ) | const |
Returns true if an array with the given name exists.
Definition at line 425 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 93 of file PRMObject_inl.h.
References PRMObject().
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 101 of file PRMObject_inl.h.
References PRMObject(), INSTANCE, and obj_type().
| bool gum::prm::PRMSystem< GUM_SCALAR >::isInstance | ( | std::string_view | name | ) | const |
Returns true if an PRMInstance with the given name exists.
Definition at line 420 of file PRMSystem_tpl.h.
References gum::prm::PRMObject::name(), and nameMap_.
Referenced by gum::prm::PRMFactory< GUM_SCALAR >::incArray().
| 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 415 of file PRMSystem_tpl.h.
References instanceMap_.
Returns true if obj_ptr is of type PRMInterface.
Definition at line 97 of file PRMObject_inl.h.
|
staticinherited |
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 71 of file PRMObject_inl.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 57 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::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::PRMSlotChain< GUM_SCALAR >::_copyLastElt_(), gum::prm::PRMSystem< GUM_SCALAR >::_groundAgg_(), gum::prm::PRMSystem< GUM_SCALAR >::_groundRef_(), gum::prm::PRMSystem< GUM_SCALAR >::_groundTensor_(), gum::prm::PRMSystem< double >::_groundTensor_(), gum::prm::PRMClass< GUM_SCALAR >::_inheritClass_(), gum::prm::PRMClass< GUM_SCALAR >::_overloadAttribute_(), gum::prm::PRMInterface< 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::PRMAggregate< GUM_SCALAR >::getCastDescendant(), 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< 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!=(), 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::PRMInterface< GUM_SCALAR >::operator[](), gum::prm::PRMClass< GUM_SCALAR >::overload(), gum::prm::PRMInterface< GUM_SCALAR >::overload(), gum::prm::PRMClassElementContainer< GUM_SCALAR >::PRMClassElementContainterConstIterator, gum::prm::PRMFormAttribute< GUM_SCALAR >::setAsCastDescendant(), gum::prm::PRMScalarAttribute< GUM_SCALAR >::setAsCastDescendant(), 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 |
|
overridevirtual |
Returns the PRM type of this object.
Implements gum::prm::PRMObject.
Definition at line 405 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 69 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 65 of file PRMObject_inl.h.
References PRMObject(), _name_, and name().
|
staticinherited |
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 73 of file PRMObject_inl.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().
| Size gum::prm::PRMSystem< GUM_SCALAR >::size | ( | ) | const |
Returns the number of PRMInstance in this PRMSystem.
Definition at line 410 of file PRMSystem_tpl.h.
References nodeIdMap_.
| const DiGraph & gum::prm::PRMSystem< GUM_SCALAR >::skeleton | ( | ) | const |
Returns the relation skeleton of this PRMSystem.
Definition at line 377 of file PRMSystem_tpl.h.
References skeleton_.
|
privateinherited |
Definition at line 193 of file PRMObject.h.
Referenced by PRMObject(), PRMObject(), PRMObject(), name(), name(), 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 295 of file PRMSystem.h.
Referenced by PRMSystem(), ~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 286 of file PRMSystem.h.
Referenced by PRMSystem(), ~PRMSystem(), get(), and isInstantiated().
|
protected |
The mapping between PRMInstance and their names.
Definition at line 283 of file PRMSystem.h.
Referenced by PRMSystem(), add(), exists(), get(), get(), and isInstance().
|
protected |
The mapping between PRMInstance and their NodeId in the relational skeleton of this PRMSystem.
Definition at line 280 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 276 of file PRMSystem.h.
Referenced by PRMSystem(), and skeleton().