49#ifndef GUM_INTERFACE_H
50#define GUM_INTERFACE_H
66 template < GUM_Numeric GUM_SCALAR >
81 template < GUM_Numeric GUM_SCALAR >
107 bool delayInheritance =
false);
139 void addArc(std::string_view tail, std::string_view head)
override;
310 const DAG&
dag_()
const override;
403#ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
Inline implementation of gum::prm::PRMInterface.
Headers of gum::PRMClassElement.
Headers of gum::PRMScalarAttribute.
The class for generic Hash Tables.
PRMAttribute is a member of a Class in a PRM.
PRMClassElementContainer(std::string_view name)
Default constructor.
Abstract class representing an element of PRM class.
A PRMClass is an object of a PRM representing a fragment of a Bayesian network which can be instantia...
typename NodeProperty< PRMClassElement< GUM_SCALAR > * >::const_iterator const_ClassEltIterator
void _addImplementation_(PRMClass< GUM_SCALAR > *c)
Add an Class<GUM_SCALAR> to the set of Class<GUM_SCALAR> which implements this PRMInterface.
Set< PRMAttribute< GUM_SCALAR > * > _attributes_
The sequence of PRMAttribute<GUM_SCALAR>s.
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.
void _inheritInterface_(const PRMInterface< GUM_SCALAR > &i)
Proceed with the copy of i in this.
PRMInterface< GUM_SCALAR > * _superInterface_
The alternate PRMClassElementContainer<GUM_SCALAR> searched for elements defined in this....
const Set< PRMAttribute< GUM_SCALAR > * > & attributes() const
Returns the set of PRMAttribute<GUM_SCALAR> of this Class<GUM_SCALAR>.
bool isOutputNode(const PRMClassElement< GUM_SCALAR > &elt) const override
See gum::prm::PRMClassElementContainer<GUM_SCALAR>::get(conststd::string&).
void _overloadReferenceSlot_(PRMReferenceSlot< GUM_SCALAR > *overloader, PRMReferenceSlot< GUM_SCALAR > *overloaded)
The alternate PRMClassElementContainer<GUM_SCALAR> searched for elements defined in this....
NodeId add(PRMClassElement< GUM_SCALAR > *elt) override
See gum::prm::PRMClassElementContainer<GUM_SCALAR>::add(PRMClassElement<GUM_SCALAR>*).
Set< PRMClass< GUM_SCALAR > * > & implementations()
Returns the set of Class<GUM_SCALAR> implementing this PRMInterface.
void addArc(std::string_view tail, std::string_view head) override
An Interfance doesn't have any arc, this will raise an OperationNotAllowed exception.
Set< PRMReferenceSlot< GUM_SCALAR > * > _referenceSlots_
The sequence of PRMReferenceSlot<GUM_SCALAR>.
PRMInterface< GUM_SCALAR > & super()
Returns the superInterface of this PRMInterface.
void inheritInterface()
Inherits from this interface super interface, this should only be done when this inteface inheritance...
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...
const ClassEltIterator & end()
PRMClassElement< GUM_SCALAR > & operator[](NodeId id) override
See gum::prm::PRMClassElementContainer<GUM_SCALAR>::operator[](NodeId).
typename NodeProperty< PRMClassElement< GUM_SCALAR > * >::iterator ClassEltIterator
PRMClassElement< GUM_SCALAR > & get(NodeId id) override
See gum::prm::PRMClassElementContainer<GUM_SCALAR>::get(NodeId).
void _overloadAttribute_(PRMAttribute< GUM_SCALAR > *overloader, PRMAttribute< GUM_SCALAR > *overloaded)
The alternate PRMClassElementContainer<GUM_SCALAR> searched for elements defined in this....
NodeId overload(PRMClassElement< GUM_SCALAR > *elt) override
Add a new PRMClassElement<GUM_SCALAR> which overload an inherited PRMClassElement<GUM_SCALAR>.
PRMObject::prm_type obj_type() const override
Implementation of pure virtual method of PRMObject.
bool _checkOverloadLegality_(const PRMClassElement< GUM_SCALAR > *overloaded, const PRMClassElement< GUM_SCALAR > *overloader)
The alternate PRMClassElementContainer<GUM_SCALAR> searched for elements defined in this....
const DAG & dag_() const override
Returns a constant reference over this PRMInterface's DAG.
~PRMInterface() override
Destructor.
void _addCastDescendants_(PRMAttribute< GUM_SCALAR > *start, PRMAttribute< GUM_SCALAR > *end)
The alternate PRMClassElementContainer<GUM_SCALAR> searched for elements defined in this....
void updateDescendants_(const PRMClassElement< GUM_SCALAR > &elt) override
See gum::prm::PRMClassElementContainer<GUM_SCALAR>(constPRMClassElement<GUM_SCALAR>&).
PRMInterface(std::string_view name)
Default constructor.
void _addExtension_(PRMInterface< GUM_SCALAR > *c)
Add an Class<GUM_SCALAR> to the set of Class<GUM_SCALAR> which implements this PRMInterface.
const Set< PRMReferenceSlot< GUM_SCALAR > * > & referenceSlots() const
Returns the set of PRMAggregate of this Class<GUM_SCALAR>.
friend class PRMClass< GUM_SCALAR >
Set< PRMClass< GUM_SCALAR > * > _implementations_
The set of Class<GUM_SCALAR> which implements this PRMInterface.
DAG _dag_
The dag representing dependencies between formal attributes and slots.
PRMInterface< GUM_SCALAR > & operator=(const PRMInterface< GUM_SCALAR > &source)
Copy operator. Don't use it.
bool isSubTypeOf(const PRMClassElementContainer< GUM_SCALAR > &cec) const override
Test if this PRMInterface is a sub PRMInterface of cec.
Set< PRMInterface< GUM_SCALAR > * > _extensions_
The set of Class<GUM_SCALAR> which implements this PRMInterface.
void findAllSubtypes_(Set< PRMClassElementContainer< GUM_SCALAR > * > &set) override
Fills set with all the subtypes of this PRMInterface, this includes extensions and implementations.
const std::string & name() const
Returns the name of this object.
prm_type
Enumeration of the different types of objects handled by 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