62 template <
typename GUM_SCALAR >
74 template <
typename GUM_SCALAR >
96 bool delayInheritance =
false);
108 bool delayInheritance =
false);
121 bool delayInheritance =
false);
194 virtual void addArc(
const std::string& tail,
const std::string& head);
323 virtual const DAG&
dag_()
const;
469#ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
Inline implementation of gum::Class.
Headers of gum::PRMParameter.
Headers of gum::PRMSlotChain.
Set of pairs of elements with fast search for both elements.
This class should be useless as only its specializations should be used.
The class for generic Hash Tables.
PRMAttribute is a member of a Class in a PRM.
PRMClassElementContainer(const std::string &name)
Default constructor.
Abstract class representing an element of PRM class.
void _addExtension_(PRMClass< GUM_SCALAR > *c)
This method is called when a sub-Class<GUM_SCALAR> of this Class<GUM_SCALAR> is created.
Set< PRMReferenceSlot< GUM_SCALAR > * > _referenceSlots_
The sequence of PRMReferenceSlot<GUM_SCALAR>.
void _overloadReference_(PRMReferenceSlot< GUM_SCALAR > *overloader, PRMReferenceSlot< GUM_SCALAR > *overloaded)
Overloads a reference slot.
bool _checkOverloadLegality_(const PRMClassElement< GUM_SCALAR > *overloaded, const PRMClassElement< GUM_SCALAR > *overloader)
Return true of overloaded can be overload by overloader.
const Set< PRMReferenceSlot< GUM_SCALAR > * > & referenceSlots() const
Returns the set of PRMReferenceSlot<GUM_SCALAR> of this Class<GUM_SCALAR>.
virtual bool isSubTypeOf(const PRMClassElementContainer< GUM_SCALAR > &cec) const
Test if this Class<GUM_SCALAR> is a subclass of cec.
PRMClass< GUM_SCALAR > * _superClass_
The alternate PRMClassElementContainer<GUM_SCALAR> searched for elements defined in this....
void initializeInheritance()
virtual void addArc(const std::string &tail, const std::string &head)
See gum::prm::PRMClassElementContainer<GUM_SCALAR>::addArc().
void _addCastDescendants_(PRMClassElement< GUM_SCALAR > *attr)
Recursively adds cast descendant of attr in this Class<GUM_SCALAR>.
void _checkInterfaces_(PRMClassElement< GUM_SCALAR > *elt)
Check that a given element respects all the class interfaces.
PRMClass(const std::string &name)
Default constructor.
void _overloadAggregate_(PRMAggregate< GUM_SCALAR > *overloader, PRMClassElement< GUM_SCALAR > *overloaded)
Overloads an aggregate.
void findAllSubtypes_(Set< PRMClassElementContainer< GUM_SCALAR > * > &set)
Fills set with all the subtypes of this Class<GUM_SCALAR>.
Bijection< const DiscreteVariable *, const DiscreteVariable * > * _bijection_
The bijection between variables in super and variables in this The bijection's firsts are attributes ...
PRMClass(const PRMClass< GUM_SCALAR > &&source)=delete
Move constructor.
Set< PRMSlotChain< GUM_SCALAR > * > _slotChains_
The set of gum::PRMSlotChain<GUM_SCALAR>s.
void _checkInterface_(PRMClassElement< GUM_SCALAR > *elt, PRMInterface< GUM_SCALAR > *i)
Check that a given element respects a specific interface.
virtual ~PRMClass()
Destructor.
virtual PRMObject::prm_type obj_type() const
Implementation of pure virtual method of PRMObject.
PRMClassElement< GUM_SCALAR > & get(NodeId id)
See gum::prm::PRMClassElementContainer<GUM_SCALAR>::get(NodeId).
void _implementInterfaces_(bool delayInheritance)
Proceed with the implementation of interfaces.
HashFunc< PRMClassElementContainer< GUM_SCALAR > * > _dummy_hashfunc_
a dummy member used to fix a compilation issue in clang4
DAG _dag_
The dag representing dependencies between formal attributes and slots.
void _checkRefInterface_(PRMReferenceSlot< GUM_SCALAR > *elt, PRMInterface< GUM_SCALAR > *i)
Check that a given element respects a specific interface.
virtual const DAG & dag_() const
returns a constant reference over this interface's dag.
PRMClass(const PRMClass< GUM_SCALAR > &source)=delete
Copy constructor.
void inheritReferenceSlots()
PRMClass< GUM_SCALAR > & operator=(const PRMClass< GUM_SCALAR > &&source)=delete
Move operator. Don't use it.
NodeProperty< PRMClassElement< GUM_SCALAR > * > _nodeIdMap_
Mapping between node's id and their name (being an attribute or a slot). Used for fast access to a me...
Set< PRMAggregate< GUM_SCALAR > * > _aggregates_
The sequence of aggregate.
void _overloadParameter_(PRMParameter< GUM_SCALAR > *overloader, PRMParameter< GUM_SCALAR > *overloaded)
Overloads a parameter.
const Set< PRMParameter< GUM_SCALAR > * > & parameters() const
Returns the set of parameters of this Class<GUM_SCALAR>.
void _inheritClass_(const PRMClass< GUM_SCALAR > &c)
Proceed with the copy when this inherits c.
const Set< PRMClass< GUM_SCALAR > * > & extensions() const
Returns the set of Class<GUM_SCALAR> which are direct sub-Class<GUM_SCALAR> of this Class<GUM_SCALAR>...
const Set< PRMAttribute< GUM_SCALAR > * > & attributes() const
Returns the set of PRMAttribute<GUM_SCALAR> of this Class<GUM_SCALAR>.
HashTable< std::string, const PRMParameter< GUM_SCALAR > * > scope() const
Returns all the parameters in the scope of this class.
virtual NodeId add(PRMClassElement< GUM_SCALAR > *elt)
See gum::prm::add(PRMClassElement<GUM_SCALAR>*).
virtual bool isOutputNode(const PRMClassElement< GUM_SCALAR > &elt) const
Returns true if elt is an output node.
Set< PRMParameter< GUM_SCALAR > * > _parameters_
The Set of parameters in this Class<GUM_SCALAR>.
PRMClassElement< GUM_SCALAR > & operator[](NodeId id)
See gum::prm::PRMClassElementContainer<GUM_SCALAR>::operator[](NodeId).
void _addIOInterfaceFlags_(PRMClassElement< GUM_SCALAR > *elt)
Check if elt is present in an implementation. If it is, its IO flags are updated.
Set< PRMClass< GUM_SCALAR > * > _extensions_
The set of Class<GUM_SCALAR> which are extension of this Class<GUM_SCALAR> (i.e. direct subtypes).
HashTable< std::string, PRMClassElement< GUM_SCALAR > * > _nameMap_
Mapping between a member's name and itself. Used for fast access to a member given it's name.
friend class PRMInterface< GUM_SCALAR >
const Set< PRMAggregate< GUM_SCALAR > * > & aggregates() const
Returns the set of PRMAggregate<GUM_SCALAR> of this Class<GUM_SCALAR>.
void completeInheritance(const std::string &attr)
const Set< PRMInterface< GUM_SCALAR > * > & implements() const
Returns the Set of PRMInterface<GUM_SCALAR> implemented by this Class<GUM_SCALAR>.
const Set< PRMSlotChain< GUM_SCALAR > * > & slotChains() const
Returns the set of PRMSlotChain<GUM_SCALAR> of this Class<GUM_SCALAR>.
void _overloadAttribute_(PRMAttribute< GUM_SCALAR > *overloader, PRMAttribute< GUM_SCALAR > *overloaded)
Overloads an attribute.
PRMClass< GUM_SCALAR > & operator=(const PRMClass< GUM_SCALAR > &source)=delete
Copy operator. Don't use it.
const PRMClass< GUM_SCALAR > & super() const
Returns the super Class<GUM_SCALAR> of this Class<GUM_SCALAR>.
Set< PRMAttribute< GUM_SCALAR > * > _attributes_
The sequence of PRMAttribute<GUM_SCALAR>s.
void updateDescendants_(const PRMClassElement< GUM_SCALAR > &elt)
See gum::prm::PRMClassElementContainer<GUM_SCALAR>(constPRMClassElement<GUM_SCALAR>&).
virtual NodeId overload(PRMClassElement< GUM_SCALAR > *elt)
See gum::prm::overload(PRMClassElement<GUM_SCALAR>*).
void _checkRefInterfaces_(PRMReferenceSlot< GUM_SCALAR > *elt)
Check that a given element respects all the class interfaces.
Set< PRMInterface< GUM_SCALAR > * > * _implements_
The Set of implemented interface of this.
bool isCastDescendant(const std::string &safe_name) const
Return true if the attribute named safe_name is a cast descendant.
An PRMInterface is implemented by a Class<GUM_SCALAR> and defines a set of PRMReferenceSlot<GUM_SCALA...
const std::string & name() const
Returns the name of this object.
prm_type
Enumeration of the different types of objects handled by a PRM.
PRMParameter is a member of a Class in a PRM.
A PRMReferenceSlot represent a relation between two PRMClassElementContainer.
Size NodeId
Type for node ids.
HashTable< NodeId, VAL > NodeProperty
Property on graph elements.
namespace for all probabilistic relational models entities
gum is the global namespace for all aGrUM entities