![]() |
aGrUM
0.20.3
a C++ library for (probabilistic) graphical models
|
An PRMInstance is a Bayesian network fragment defined by a Class and used in a PRMSystem. More...
#include <PRMInstance.h>
Public Member Functions | |
Constructors & private operators. | |
PRMInstance (const std::string &name, PRMClass< GUM_SCALAR > &type) | |
Default constructor of an PRMInstance<GUM_SCALAR>. More... | |
virtual | ~PRMInstance () |
Destructor. More... | |
Getters & setters. | |
virtual prm_type | obj_type () const |
Returns the PRM type of this object. More... | |
PRMClass< GUM_SCALAR > & | type () |
Returns the type of this instance. More... | |
const PRMClass< GUM_SCALAR > & | type () const |
Returns the type of this instance. More... | |
bool | exists (NodeId id) const |
Returns true if id matches an PRMAttribute<GUM_SCALAR> in this PRMInstance<GUM_SCALAR>. More... | |
bool | exists (const std::string &name) const |
Returns true if name matches an PRMAttribute<GUM_SCALAR> in this PRMInstance<GUM_SCALAR>. More... | |
PRMAttribute< GUM_SCALAR > & | get (NodeId id) |
Getter on an PRMAttribute<GUM_SCALAR> of this PRMInstance<GUM_SCALAR>. More... | |
PRMAttribute< GUM_SCALAR > & | get (const std::string &name) |
Given a name returns the related PRMAttribute<GUM_SCALAR>. More... | |
const PRMAttribute< GUM_SCALAR > & | get (NodeId id) const |
Getter on an PRMAttribute<GUM_SCALAR> of this PRMInstance<GUM_SCALAR>. More... | |
const PRMAttribute< GUM_SCALAR > & | get (const std::string &name) const |
Given a name returns the related PRMClassElement. More... | |
Size | size () const |
Returns the number of attributes in this PRMInstance<GUM_SCALAR>. More... | |
Instantiation methods. | |
void | instantiate () |
Instantiate all nodes which requires it. More... | |
const Bijection< const DiscreteVariable *, const DiscreteVariable *> & | bijection () const |
Returns a mapping between DiscreteVariable used in this and the ones used in this PRMInstance<GUM_SCALAR>'s Class<GUM_SCALAR>. More... | |
Reference handling. | |
void | add (NodeId id, PRMInstance< GUM_SCALAR > &instance) |
Add an PRMInstance<GUM_SCALAR> to a given PRMReferenceSlot, PRMSlotChain<GUM_SCALAR> or output node. More... | |
const PRMInstance< GUM_SCALAR > & | getInstance (NodeId id) const |
Fast access to the first instance in a PRMReferenceSlot or PRMSlotChain<GUM_SCALAR>. More... | |
const Set< PRMInstance< GUM_SCALAR > *> & | getInstances (NodeId id) const |
Returns the Set of PRMInstance<GUM_SCALAR> referenced by id. More... | |
bool | hasRefAttr (NodeId id) const |
Returns true if id has at least one referring PRMAttribute<GUM_SCALAR>. More... | |
std::vector< std::pair< PRMInstance< GUM_SCALAR > *, std::string > > & | getRefAttr (NodeId id) |
Returns a vector of pairs of refering attributes of id. More... | |
const std::vector< std::pair< PRMInstance< GUM_SCALAR > *, std::string > > & | getRefAttr (NodeId id) const |
Returns a vector of pairs of refering attributes of id. More... | |
Getters & setters. | |
const std::string & | name () const |
Returns the name of this object. More... | |
void | name (const std::string &name) |
Change the name of the PRM Object. More... | |
Operators | |
bool | operator== (const PRMObject &obj) const |
To PRMObject are equal if they have the same name (which is unique). More... | |
bool | operator!= (const PRMObject &obj) const |
To PRMObject are equal if they have the same name (which is unique). More... | |
Classes | |
class | RefConstIterator |
Nested class to iterate over PRMReferenceSlot and PRMSlotChain<GUM_SCALAR> instantiations. More... | |
class | RefIterator |
Nested class to iterate over PRMReferenceSlot and PRMSlotChain<GUM_SCALAR> instantiations. More... | |
Iterators | |
typedef NodeProperty< PRMAttribute< GUM_SCALAR > *>::iterator | iterator |
Alias to iterate over the gum::prm::PRMAttribute<GUM_SCALAR> in this PRMInstance<GUM_SCALAR>. More... | |
typedef NodeProperty< PRMAttribute< GUM_SCALAR > *>::const_iterator | const_iterator |
Alias to iterate over the gum::prm::PRMAttribute<GUM_SCALAR> in this PRMInstance<GUM_SCALAR>. More... | |
typedef NodeProperty< std::vector< std::pair< PRMInstance< GUM_SCALAR > *, std::string > > *>::iterator | InvRefIterator |
Alias to iterate over the gum::prm::PRMAttribute<GUM_SCALAR> in this PRMInstance<GUM_SCALAR>. More... | |
typedef NodeProperty< std::vector< std::pair< PRMInstance< GUM_SCALAR > *, std::string > > *>::const_iterator | InvRefConstIterator |
Alias to iterate over the gum::prm::PRMAttribute<GUM_SCALAR> in this PRMInstance<GUM_SCALAR>. More... | |
iterator | begin () |
Returns an iterator at the begining of the list of gum::prm::PRMAttribute<GUM_SCALAR> in this PRMInstance<GUM_SCALAR>. More... | |
const iterator & | end () |
Returns a reference over the iterator at the end of the list of gum::prm::PRMAttribute<GUM_SCALAR> in this PRMInstance<GUM_SCALAR>. More... | |
const_iterator | begin () const |
Returns an iterator at the beginning of the list of gum::prm::PRMAttribute<GUM_SCALAR> in this PRMInstance<GUM_SCALAR>. More... | |
const const_iterator & | end () const |
Returns a reference over the iterator at the end of the list of gum::prm::PRMAttribute<GUM_SCALAR> in this PRMInstance<GUM_SCALAR>. More... | |
RefIterator | begin (NodeId id) |
Returns an iterator at the beginning of the set of PRMInstance<GUM_SCALAR> associated to a given gum::prm::PRMReferenceSlot or gum::prm::PRMSlotChain<GUM_SCALAR>. More... | |
RefConstIterator | begin (NodeId id) const |
Returns an iterator at the beginning of the set of PRMInstance<GUM_SCALAR> associated to a given gum::prm::PRMReferenceSlot or gum::prm::PRMSlotChain<GUM_SCALAR>. More... | |
InvRefIterator | beginInvRef () |
Alias to iterate over the gum::prm::PRMAttribute<GUM_SCALAR> in this PRMInstance<GUM_SCALAR>. More... | |
const InvRefIterator & | endInvRef () |
Alias to iterate over the gum::prm::PRMAttribute<GUM_SCALAR> in this PRMInstance<GUM_SCALAR>. More... | |
InvRefConstIterator | beginInvRef () const |
Alias to iterate over the gum::prm::PRMAttribute<GUM_SCALAR> in this PRMInstance<GUM_SCALAR>. More... | |
const InvRefConstIterator & | endInvRef () const |
Alias to iterate over the gum::prm::PRMAttribute<GUM_SCALAR> in this PRMInstance<GUM_SCALAR>. More... | |
Private members. | |
typedef std::pair< PRMInstance< GUM_SCALAR > *, std::string > | pair |
Code alias. More... | |
bool | _instantiated_ |
True if this instance has been instantiated. More... | |
PRMClass< GUM_SCALAR > * | _type_ |
The type of this PRMInstance<GUM_SCALAR>. More... | |
NodeProperty< PRMAttribute< GUM_SCALAR > *> | _nodeIdMap_ |
The gum::prm::PRMAttribute<GUM_SCALAR> and gum::prm::PRMAggregate<GUM_SCALAR> of this PRMInstance<GUM_SCALAR>. More... | |
NodeProperty< Set< PRMInstance< GUM_SCALAR > *> *> | _referenceMap_ |
Mapping between the gum::prm::PRMReferenceSlot and gum::prm::PRMSlotChain<GUM_SCALAR> in type / and the PRMInstance<GUM_SCALAR> associated with it. More... | |
NodeProperty< std::vector< pair > *> | _referingAttr_ |
The set of pair (instance, attribute) referring an attribute of this instance. More... | |
Bijection< const DiscreteVariable *, const DiscreteVariable *> | _bijection_ |
A bijection used for MultiDim handling. More... | |
Built-in types. | |
enum | prm_type : char { prm_type::ALL, prm_type::CLASS, prm_type::PRM_INTERFACE, prm_type::CLASS_ELT, prm_type::TYPE, prm_type::SYSTEM, prm_type::INSTANCE } |
Enumeration of the different types of objects handled by a PRM. More... | |
static std::string | LEFT_CAST () |
Enumeration of the different types of objects handled by a PRM. More... | |
static std::string | RIGHT_CAST () |
Enumeration of the different types of objects handled by a PRM. More... | |
static std::string | enum2str (prm_type type) |
Returns the string representation of a PRMObject. More... | |
static INLINE bool | isClass (const PRMObject &obj) |
Returns true if obj_ptr is of type Class. More... | |
static INLINE bool | isInterface (const PRMObject &obj) |
Returns true if obj_ptr is of type PRMInterface. More... | |
static INLINE bool | isInstance (const PRMObject &obj) |
Returns true if obj_ptr is of type PRMInstance. More... | |
An PRMInstance is a Bayesian network fragment defined by a Class and used in a PRMSystem.
Before using an PRMInstance for inference YOU MUST call PRMInstance::instantiateSlotChains() and PRMInstance::instantiate() on it before, otherwise DiscreteVariable pointers will be inconsistent and inference will be erroneous. Of course, this must be done once you have set all reference in the current system.
Definition at line 62 of file PRMInstance.h.
typedef NodeProperty< PRMAttribute< GUM_SCALAR >* >::const_iterator gum::prm::PRMInstance< GUM_SCALAR >::const_iterator |
Alias to iterate over the gum::prm::PRMAttribute<GUM_SCALAR> in this PRMInstance<GUM_SCALAR>.
Definition at line 323 of file PRMInstance.h.
typedef NodeProperty< std::vector< std::pair< PRMInstance< GUM_SCALAR >*, std::string > >* >::const_iterator gum::prm::PRMInstance< GUM_SCALAR >::InvRefConstIterator |
Alias to iterate over the gum::prm::PRMAttribute<GUM_SCALAR> in this PRMInstance<GUM_SCALAR>.
Definition at line 441 of file PRMInstance.h.
typedef NodeProperty< std::vector< std::pair< PRMInstance< GUM_SCALAR >*, std::string > >* >::iterator gum::prm::PRMInstance< GUM_SCALAR >::InvRefIterator |
Alias to iterate over the gum::prm::PRMAttribute<GUM_SCALAR> in this PRMInstance<GUM_SCALAR>.
Definition at line 438 of file PRMInstance.h.
typedef NodeProperty< PRMAttribute< GUM_SCALAR >* >::iterator gum::prm::PRMInstance< GUM_SCALAR >::iterator |
Alias to iterate over the gum::prm::PRMAttribute<GUM_SCALAR> in this PRMInstance<GUM_SCALAR>.
Definition at line 310 of file PRMInstance.h.
|
private |
Code alias.
Definition at line 515 of file PRMInstance.h.
|
stronginherited |
Enumeration of the different types of objects handled by a PRM.
The "all" type is used to tell that we want any kind of PRMType (useful with iterators for example). No PRMObject will ever have "all" as type.
Enumerator | |
---|---|
ALL | |
CLASS | |
PRM_INTERFACE | |
CLASS_ELT | |
TYPE | |
SYSTEM | |
INSTANCE |
Definition at line 68 of file PRMObject.h.
gum::prm::PRMInstance< GUM_SCALAR >::PRMInstance | ( | const std::string & | name, |
PRMClass< GUM_SCALAR > & | type | ||
) |
Default constructor of an PRMInstance<GUM_SCALAR>.
When you create an PRMInstance<GUM_SCALAR> all gum::prm::PRMAttribute<GUM_SCALAR> in it's type are added, except for gum::prm::PRMAggregate<GUM_SCALAR> and parameters which are instantiated.
However neither of their children or parents are updated (i.e. DiscreteVariable pointers are inconsistent).
Definition at line 36 of file PRMInstance_tpl.h.
|
virtual |
Destructor.
Definition at line 51 of file PRMInstance_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
|
private |
Copy constructor.
Definition at line 247 of file PRMInstance_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
|
private |
Add this as a referring instance over the attribute pointed by sc in i.
sc | A slot chain pointing over an attribute in i. |
i | An instance holding an attribute pointed by sc. |
Definition at line 318 of file PRMInstance_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
|
private |
Used at construction to instantiate aggregates.
Definition at line 225 of file PRMInstance_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
|
private |
Used at construction to instantiate attributes.
source | An attribute in type. |
Definition at line 236 of file PRMInstance_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
|
private |
Copy the content of an PRMAttribute<GUM_SCALAR> from its Class<GUM_SCALAR> counterpart.
attr | An PRMAttribute<GUM_SCALAR> of this PRMInstance<GUM_SCALAR>. |
OperationNotAllowed | If the MultiDimImplementation is of an unknown type. |
Definition at line 570 of file PRMInstance_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
|
private |
Starts this instance instantiations.
Definition at line 73 of file PRMInstance_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
|
private |
Retrieve all instances referred by sc.
sc | A slot chain of this instance's type. |
NotFound | Raised if a reference in sc is not instantiated. |
Definition at line 110 of file PRMInstance_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
void gum::prm::PRMInstance< GUM_SCALAR >::add | ( | NodeId | id, |
PRMInstance< GUM_SCALAR > & | instance | ||
) |
Add an PRMInstance<GUM_SCALAR> to a given PRMReferenceSlot, PRMSlotChain<GUM_SCALAR> or output node.
Three type of nodes can be associated with an PRMInstance<GUM_SCALAR>. When an PRMInstance<GUM_SCALAR> is associated with a PRMReferenceSlot, it represents an arc in the relational skeleton. For a PRMSlotChain<GUM_SCALAR>, it is a placeholder of referenced PRMClassElement by this PRMInstance<GUM_SCALAR>. Finally, for an output node it indicates that an PRMInstance<GUM_SCALAR> has an PRMClassElement referring it.
id | The NodeId of a PRMReferenceSlot of this PRMInstance<GUM_SCALAR>. |
instance | The instance added as references by id in this PRMInstance<GUM_SCALAR>. |
WrongClassElement | Raised if id is not a valid PRMClassElement. |
OutOfUpperBound | Raised if no more PRMInstance<GUM_SCALAR> can be added to id. |
PRMTypeError | Raised if instance's type isn't compatible with the reference's type. |
NotFound | If there is no PRMClassElement given id. |
Definition at line 153 of file PRMInstance_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
INLINE PRMInstance< GUM_SCALAR >::iterator gum::prm::PRMInstance< GUM_SCALAR >::begin | ( | ) |
Returns an iterator at the begining of the list of gum::prm::PRMAttribute<GUM_SCALAR> in this PRMInstance<GUM_SCALAR>.
Definition at line 369 of file PRMInstance_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
INLINE PRMInstance< GUM_SCALAR >::const_iterator gum::prm::PRMInstance< GUM_SCALAR >::begin | ( | ) | const |
Returns an iterator at the beginning of the list of gum::prm::PRMAttribute<GUM_SCALAR> in this PRMInstance<GUM_SCALAR>.
Definition at line 380 of file PRMInstance_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
INLINE PRMInstance< GUM_SCALAR >::RefIterator gum::prm::PRMInstance< GUM_SCALAR >::begin | ( | NodeId | id | ) |
Returns an iterator at the beginning of the set of PRMInstance<GUM_SCALAR> associated to a given gum::prm::PRMReferenceSlot or gum::prm::PRMSlotChain<GUM_SCALAR>.
id | A gum::prm::PRMReferenceSlot or gum::prm::PRMSlotChain<GUM_SCALAR> in this PRMInstance<GUM_SCALAR> type. |
NotFound | Raised if no gum::prm::PRMClassElement in this PRMInstance<GUM_SCALAR> type matches id. |
WrongClassElement | Raised if id is neither a PRMReferenceSlot or PRMSlotChain<GUM_SCALAR>. |
Definition at line 392 of file PRMInstance_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
INLINE PRMInstance< GUM_SCALAR >::RefConstIterator gum::prm::PRMInstance< GUM_SCALAR >::begin | ( | NodeId | id | ) | const |
Returns an iterator at the beginning of the set of PRMInstance<GUM_SCALAR> associated to a given gum::prm::PRMReferenceSlot or gum::prm::PRMSlotChain<GUM_SCALAR>.
id | A gum::prm::PRMReferenceSlot or gum::prm::PRMSlotChain<GUM_SCALAR> in this PRMInstance<GUM_SCALAR> type. |
NotFound | Raised if no gum::prm::PRMClassElement in this PRMInstance<GUM_SCALAR> type matches id. |
WrongClassElement | Raised if id is neither a PRMReferenceSlot or PRMSlotChain<GUM_SCALAR>. |
Definition at line 400 of file PRMInstance_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
INLINE PRMInstance< GUM_SCALAR >::InvRefIterator gum::prm::PRMInstance< GUM_SCALAR >::beginInvRef | ( | ) |
Alias to iterate over the gum::prm::PRMAttribute<GUM_SCALAR> in this PRMInstance<GUM_SCALAR>.
Definition at line 530 of file PRMInstance_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
INLINE PRMInstance< GUM_SCALAR >::InvRefConstIterator gum::prm::PRMInstance< GUM_SCALAR >::beginInvRef | ( | ) | const |
Alias to iterate over the gum::prm::PRMAttribute<GUM_SCALAR> in this PRMInstance<GUM_SCALAR>.
Definition at line 542 of file PRMInstance_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
INLINE const Bijection< const DiscreteVariable *, const DiscreteVariable *> & gum::prm::PRMInstance< GUM_SCALAR >::bijection | ( | ) | const |
Returns a mapping between DiscreteVariable used in this and the ones used in this PRMInstance<GUM_SCALAR>'s Class<GUM_SCALAR>.
MultiDims require distinctive DiscreteVariable pointers, thus interface attributes are always instantiated to prevent multiple insertion of the same DiscreteVariable pointer in a MultiDim.
Definition at line 336 of file PRMInstance_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
INLINE const PRMInstance< GUM_SCALAR >::iterator & gum::prm::PRMInstance< GUM_SCALAR >::end | ( | ) |
Returns a reference over the iterator at the end of the list of gum::prm::PRMAttribute<GUM_SCALAR> in this PRMInstance<GUM_SCALAR>.
Definition at line 374 of file PRMInstance_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
INLINE const PRMInstance< GUM_SCALAR >::const_iterator & gum::prm::PRMInstance< GUM_SCALAR >::end | ( | ) | const |
Returns a reference over the iterator at the end of the list of gum::prm::PRMAttribute<GUM_SCALAR> in this PRMInstance<GUM_SCALAR>.
Definition at line 386 of file PRMInstance_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
INLINE const PRMInstance< GUM_SCALAR >::InvRefIterator & gum::prm::PRMInstance< GUM_SCALAR >::endInvRef | ( | ) |
Alias to iterate over the gum::prm::PRMAttribute<GUM_SCALAR> in this PRMInstance<GUM_SCALAR>.
Definition at line 536 of file PRMInstance_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
INLINE const PRMInstance< GUM_SCALAR >::InvRefConstIterator & gum::prm::PRMInstance< GUM_SCALAR >::endInvRef | ( | ) | const |
Alias to iterate over the gum::prm::PRMAttribute<GUM_SCALAR> in this PRMInstance<GUM_SCALAR>.
Definition at line 548 of file PRMInstance_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
|
inlinestaticinherited |
INLINE bool gum::prm::PRMInstance< GUM_SCALAR >::exists | ( | NodeId | id | ) | const |
Returns true if id matches an PRMAttribute<GUM_SCALAR> in this PRMInstance<GUM_SCALAR>.
Definition at line 275 of file PRMInstance_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
INLINE bool gum::prm::PRMInstance< GUM_SCALAR >::exists | ( | const std::string & | name | ) | const |
Returns true if name matches an PRMAttribute<GUM_SCALAR> in this PRMInstance<GUM_SCALAR>.
Definition at line 280 of file PRMInstance_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
INLINE PRMAttribute< GUM_SCALAR > & gum::prm::PRMInstance< GUM_SCALAR >::get | ( | NodeId | id | ) |
Getter on an PRMAttribute<GUM_SCALAR> of this PRMInstance<GUM_SCALAR>.
Recall that PRMAggregate<GUM_SCALAR> are instantiated as PRMAttribute<GUM_SCALAR> when an PRMInstance<GUM_SCALAR> is created. Thus any random variable contained in this PRMInstance<GUM_SCALAR> is mapped to an PRMAttribute<GUM_SCALAR>.
id | The PRMAttribute<GUM_SCALAR> id. |
NotFound | Raised if no PRMAttribute<GUM_SCALAR> matches name. |
Definition at line 285 of file PRMInstance_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
INLINE PRMAttribute< GUM_SCALAR > & gum::prm::PRMInstance< GUM_SCALAR >::get | ( | const std::string & | name | ) |
Given a name returns the related PRMAttribute<GUM_SCALAR>.
name | The PRMAttribute<GUM_SCALAR>'s name. |
NotFound | Raised if there is no PRMAttribute<GUM_SCALAR> named n. |
Definition at line 303 of file PRMInstance_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
INLINE const PRMAttribute< GUM_SCALAR > & gum::prm::PRMInstance< GUM_SCALAR >::get | ( | NodeId | id | ) | const |
Getter on an PRMAttribute<GUM_SCALAR> of this PRMInstance<GUM_SCALAR>.
Recall that PRMAggregate<GUM_SCALAR> are instantiated has PRMAttribute<GUM_SCALAR> when an PRMInstance<GUM_SCALAR> is created. Thus any random variable contained in this PRMInstance<GUM_SCALAR> is mapped to an PRMAttribute<GUM_SCALAR>.
id | The PRMAttribute<GUM_SCALAR> id. |
NotFound | Raised if no PRMAttribute<GUM_SCALAR> matches name. |
Definition at line 294 of file PRMInstance_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
INLINE const PRMAttribute< GUM_SCALAR > & gum::prm::PRMInstance< GUM_SCALAR >::get | ( | const std::string & | name | ) | const |
Given a name returns the related PRMClassElement.
name | The PRMClassElement's name. |
NotFound | Raised if there is no PRMClassElement named n. |
Definition at line 311 of file PRMInstance_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
INLINE const PRMInstance< GUM_SCALAR > & gum::prm::PRMInstance< GUM_SCALAR >::getInstance | ( | NodeId | id | ) | const |
Fast access to the first instance in a PRMReferenceSlot or PRMSlotChain<GUM_SCALAR>.
This is equivalent to **(this->getInstance(id).begin()) and should be use when dealing with non multiple PRMReferenceSlot or PRMSlotChain<GUM_SCALAR>.
id | The NodeId of a PRMReferenceSlot or PRMSlotChain<GUM_SCALAR> in this PRMInstance<GUM_SCALAR>. |
NotFound | Raised if there is no PRMClassElement given id. |
UndefinedElement | Raised if no PRMInstance<GUM_SCALAR> are referenced by id. |
Definition at line 342 of file PRMInstance_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
INLINE const Set< PRMInstance< GUM_SCALAR > *> & gum::prm::PRMInstance< GUM_SCALAR >::getInstances | ( | NodeId | id | ) | const |
Returns the Set of PRMInstance<GUM_SCALAR> referenced by id.
id | The NodeId of a PRMReferenceSlot or PRMSlotChain<GUM_SCALAR> in this. |
NotFound | If there is no PRMClassElement given id. |
Definition at line 358 of file PRMInstance_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
INLINE std::vector< std::pair< PRMInstance< GUM_SCALAR > *, std::string > > & gum::prm::PRMInstance< GUM_SCALAR >::getRefAttr | ( | NodeId | id | ) |
Returns a vector of pairs of refering attributes of id.
Definition at line 554 of file PRMInstance_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
INLINE const std::vector< std::pair< PRMInstance< GUM_SCALAR > *, std::string > > & gum::prm::PRMInstance< GUM_SCALAR >::getRefAttr | ( | NodeId | id | ) | const |
Returns a vector of pairs of refering attributes of id.
Definition at line 560 of file PRMInstance_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
INLINE bool gum::prm::PRMInstance< GUM_SCALAR >::hasRefAttr | ( | NodeId | id | ) | const |
Returns true if id has at least one referring PRMAttribute<GUM_SCALAR>.
id | A NodeId. |
Definition at line 565 of file PRMInstance_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
void gum::prm::PRMInstance< GUM_SCALAR >::instantiate | ( | ) |
Instantiate all nodes which requires it.
All attributes are now instantiated, which means they have a different DiscreteVariable pointer. This methods however still connects attributes of different instance together.
Definition at line 65 of file PRMInstance_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
Returns true if obj_ptr is of type Class.
Definition at line 109 of file PRMObject.h.
References gum::prm::PRMObject::PRMObject().
Returns true if obj_ptr is of type PRMInstance.
Definition at line 117 of file PRMObject.h.
References gum::prm::PRMObject::PRMObject().
Returns true if obj_ptr is of type PRMInterface.
Definition at line 112 of file PRMObject.h.
References gum::prm::PRMObject::PRMObject().
|
inlinestaticinherited |
Enumeration of the different types of objects handled by a PRM.
The "all" type is used to tell that we want any kind of PRMType (useful with iterators for example). No PRMObject will ever have "all" as type.
Definition at line 79 of file PRMObject.h.
|
inherited |
Returns the name of this object.
Definition at line 34 of file PRMObject_inl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
|
inherited |
Change the name of the PRM Object.
Definition at line 38 of file PRMObject_inl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
|
virtual |
Returns the PRM type of this object.
Implements gum::prm::PRMObject.
Definition at line 260 of file PRMInstance_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
To PRMObject are equal if they have the same name (which is unique).
Definition at line 46 of file PRMObject_inl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
|
private |
Copy operator. Don't use it.
Definition at line 255 of file PRMInstance_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
To PRMObject are equal if they have the same name (which is unique).
Definition at line 42 of file PRMObject_inl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
|
inlinestaticinherited |
Enumeration of the different types of objects handled by a PRM.
The "all" type is used to tell that we want any kind of PRMType (useful with iterators for example). No PRMObject will ever have "all" as type.
Definition at line 80 of file PRMObject.h.
INLINE Size gum::prm::PRMInstance< GUM_SCALAR >::size | ( | ) | const |
Returns the number of attributes in this PRMInstance<GUM_SCALAR>.
Definition at line 220 of file PRMInstance_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
INLINE PRMClass< GUM_SCALAR > & gum::prm::PRMInstance< GUM_SCALAR >::type | ( | ) |
Returns the type of this instance.
Definition at line 265 of file PRMInstance_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
INLINE const PRMClass< GUM_SCALAR > & gum::prm::PRMInstance< GUM_SCALAR >::type | ( | ) | const |
Returns the type of this instance.
Definition at line 270 of file PRMInstance_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
|
private |
A bijection used for MultiDim handling.
Definition at line 522 of file PRMInstance.h.
|
private |
True if this instance has been instantiated.
Definition at line 500 of file PRMInstance.h.
|
private |
The gum::prm::PRMAttribute<GUM_SCALAR> and gum::prm::PRMAggregate<GUM_SCALAR> of this PRMInstance<GUM_SCALAR>.
Definition at line 507 of file PRMInstance.h.
|
private |
Mapping between the gum::prm::PRMReferenceSlot and gum::prm::PRMSlotChain<GUM_SCALAR> in type / and the PRMInstance<GUM_SCALAR> associated with it.
Definition at line 512 of file PRMInstance.h.
|
private |
The set of pair (instance, attribute) referring an attribute of this instance.
Definition at line 519 of file PRMInstance.h.
|
private |
The type of this PRMInstance<GUM_SCALAR>.
Definition at line 503 of file PRMInstance.h.