30 #ifndef GUM_INSTANCE_H 31 #define GUM_INSTANCE_H 62 template <
typename GUM_SCALAR >
120 bool exists(
const std::string& name)
const;
297 std::vector< std::pair< PRMInstance< GUM_SCALAR >*, std::string > >&
303 const std::vector< std::pair< PRMInstance< GUM_SCALAR >*, std::string > >&
324 const iterator&
end();
443 std::pair< PRMInstance< GUM_SCALAR >*, std::string > >* >
::iterator 522 typedef std::pair< PRMInstance< GUM_SCALAR >*, std::string >
pair;
535 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS PRMClass< GUM_SCALAR > * __type
The type of this PRMInstance<GUM_SCALAR>.
const PRMInstance< GUM_SCALAR > & getInstance(NodeId id) const
Fast access to the first instance in a PRMReferenceSlot or PRMSlotChain<GUM_SCALAR>.
Unsafe Const Iterators for hashtablesHashTableConstIterator provides a fast but unsafe way to parse H...
Set< PRMInstance< GUM_SCALAR > *>::const_iterator __iter
void add(NodeId id, PRMInstance< GUM_SCALAR > &instance)
Add an PRMInstance<GUM_SCALAR> to a given PRMReferenceSlot, PRMSlotChain<GUM_SCALAR> or output node...
PRMInstance(const std::string &name, PRMClass< GUM_SCALAR > &type)
Default constructor of an PRMInstance<GUM_SCALAR>.
const std::string & name() const
Returns the name of this object.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
An PRMInstance is a Bayesian Network fragment defined by a Class and used in a PRMSystem.
void instantiate()
Instantiate all nodes which requires it.
bool operator==(const RefIterator &from) const
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
void __addReferingInstance(PRMSlotChain< GUM_SCALAR > *sc, PRMInstance< GUM_SCALAR > *i)
Add this as a referring instance over the attribute pointed by sc in i.
Unsafe Iterators for hashtablesHashTableIterator provides a fast but unsafe way to parse HashTables...
PRMClass< GUM_SCALAR > & type()
Returns the type of this instance.
std::pair< PRMInstance< GUM_SCALAR > *, std::string > pair
Code alias.
Bijection< const DiscreteVariable *, const DiscreteVariable *> __bijection
A bijection used for MultiDim handling.
PRMInstance< GUM_SCALAR > * operator->() const
NodeProperty< std::vector< pair > *> __referingAttr
The set of pair (instance, attribute) referring an attribute of this instance.
bool exists(NodeId id) const
Returns true if id matches an PRMAttribute<GUM_SCALAR> in this PRMInstance<GUM_SCALAR>.
RefIterator & operator++()
void __doInstantiate()
Starts this instance instantiations.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
The class for generic Hash Tables.
bool __instantiated
True if this instance has been instantiated.
Size size() const
Returns the number of attributes in this PRMInstance<GUM_SCALAR>.
NodeProperty< Set< PRMInstance< GUM_SCALAR > *> *> __referenceMap
Mapping between the gum::prm::PRMReferenceSlot and gum::prm::PRMSlotChain<GUM_SCALAR> in __type / and...
RefIterator(Set< PRMInstance< GUM_SCALAR > * > &set)
Nested class to iterate over PRMReferenceSlot and PRMSlotChain<GUM_SCALAR> instantiations.
void __copyAttributeCPF(PRMAttribute< GUM_SCALAR > *attr)
Copy the content of an PRMAttribute<GUM_SCALAR> from its Class<GUM_SCALAR> counterpart.
void __instantiateSlotChain(PRMSlotChain< GUM_SCALAR > *sc)
Retrieve all instances referred by sc.
InvRefIterator beginInvRef()
Alias to iterate over the gum::prm::PRMAttribute<GUM_SCALAR> in this PRMInstance<GUM_SCALAR>.
std::vector< std::pair< PRMInstance< GUM_SCALAR > *, std::string > > & getRefAttr(NodeId id)
Returns a vector of pairs of refering attributes of id.
Representation of a setA Set is a structure that contains arbitrary elements.
PRMInstance< GUM_SCALAR > & operator*() const
void __copyAttribute(PRMAttribute< GUM_SCALAR > *source)
Used at construction to instantiate attributes.
prm_type
Enumeration of the different types of objects handled by a PRM.
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>.
void __copyAggregates(PRMAggregate< GUM_SCALAR > *source)
Used at construction to instantiate aggregates.
const Bijection< const DiscreteVariable *, const DiscreteVariable *> & bijection() const
Returns a mapping between DiscreteVariable used in this and the ones used in this PRMInstance<GUM_SCA...
Set< PRMInstance< GUM_SCALAR > *> & __set
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>.
Set of pairs of elements with fast search for both elements.
virtual prm_type obj_type() const
Returns the PRM type of this object.
A PRMSlotChain represents a sequence of gum::prm::PRMClassElement<GUM_SCALAR> where the n-1 first gum...
Abstract base class for any element defined in a PRM.
Set< PRMInstance< GUM_SCALAR > *>::iterator __iter
const iterator & end()
Returns a reference over the iterator at the end of the list of gum::prm::PRMAttribute<GUM_SCALAR> in...
A PRMClass is an object of a PRM representing a fragment of a Bayesian Network which can be instantia...
bool hasRefAttr(NodeId id) const
Returns true if id has at least one referring PRMAttribute<GUM_SCALAR>.
NodeProperty< PRMAttribute< GUM_SCALAR > *>::iterator iterator
Alias to iterate over the gum::prm::PRMAttribute<GUM_SCALAR> in this PRMInstance<GUM_SCALAR>.
PRMAttribute is a member of a Class in a PRM.
std::size_t Size
In aGrUM, hashed values are unsigned long int.
RefIterator & operator=(const RefIterator &from)
iterator begin()
Returns an iterator at the begining of the list of gum::prm::PRMAttribute<GUM_SCALAR> in this PRMInst...
Nested class to iterate over PRMReferenceSlot and PRMSlotChain<GUM_SCALAR> instantiations.
const InvRefIterator & endInvRef()
Alias to iterate over the gum::prm::PRMAttribute<GUM_SCALAR> in this PRMInstance<GUM_SCALAR>.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
NodeProperty< PRMAttribute< GUM_SCALAR > *>::const_iterator const_iterator
Alias to iterate over the gum::prm::PRMAttribute<GUM_SCALAR> in this PRMInstance<GUM_SCALAR>.
Size NodeId
Type for node ids.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
bool operator!=(const RefIterator &from) const
NodeProperty< PRMAttribute< GUM_SCALAR > *> __nodeIdMap
The gum::prm::PRMAttribute<GUM_SCALAR> and gum::prm::PRMAggregate<GUM_SCALAR> of this PRMInstance<GUM...
const Set< PRMInstance< GUM_SCALAR > *> & getInstances(NodeId id) const
Returns the Set of PRMInstance<GUM_SCALAR> referenced by id.
const Set< PRMInstance< GUM_SCALAR > *> & __set