49#ifndef GUM_CLASS_ELEMENT_CONTAINER_H
50#define GUM_CLASS_ELEMENT_CONTAINER_H
58 template < GUM_Numeric GUM_SCALAR >
60 template < GUM_Numeric GUM_SCALAR >
62 class PRMClassElementContainterIterator;
63 class PRMClassElementContainterConstIterator;
78 template < GUM_Numeric GUM_SCALAR >
113 virtual bool exists(std::string_view
name)
const;
196 virtual void addArc(std::string_view tail, std::string_view head) = 0;
425 virtual const std::pair< bool, bool >&
434 const std::pair< bool, bool >& flags);
455#ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
466template < gum::GUM_Numeric GUM_SCALAR >
std::ostream & operator<<(std::ostream &output, const gum::prm::PRMClassElementContainer< GUM_SCALAR > &container)
An << operator for PRMClassElementContainer. Output in the graphviz-dot format.
Inline implementation of gum::PRMClassElementContainer.
The class for generic Hash Tables.
<agrum/PRM/classElementContainer.h>
friend class PRMClassElementContainterIterator
virtual PRMClassElement< GUM_SCALAR > & get(NodeId id)=0
Getter on a member of this PRMClassElementContainer.
PRMClassElementContainer(std::string_view name)
Default constructor.
virtual NodeId overload(PRMClassElement< GUM_SCALAR > *elt)=0
Add a PRMClassElement<GUM_SCALAR> which overload an inherited PRMClassElement<GUM_SCALAR>.
virtual bool isSuperTypeOf(const PRMClassElementContainer< GUM_SCALAR > &cec) const
Test if this PRMClassElementContainer is a super type of cec.
virtual const DAG & containerDag() const
Returns the gum::DAG of this PRMClassElementContainer.
virtual const PRMClassElement< GUM_SCALAR > & operator[](NodeId id) const =0
Constant getter on a member of this PRMClassElementContainer.
virtual void copyIOFlags_(const PRMClassElementContainer< GUM_SCALAR > &c)
Copy the IO Flags of c in this PRMClassElementContainer.
virtual std::pair< bool, bool > & getIOFlag_(const PRMClassElement< GUM_SCALAR > &elt)
Returns the IO flags of a PRMClassElement<GUM_SCALAR>.
virtual PRMClassElement< GUM_SCALAR > & operator[](std::string_view name)=0
Getter on a member of this PRMClassElementContainer.
virtual bool exists(std::string_view name) const
Returns true if a member with the given name exists in this PRMClassElementContainer or in the PRMCla...
virtual void findAllSubtypes_(Set< PRMClassElementContainer< GUM_SCALAR > * > &set)=0
Fills set with all the subtypes of this PRMInterface, this includes extensions and implementations.
virtual void updateDescendants_(const PRMClassElement< GUM_SCALAR > &elt)=0
When a PRMClassElement<GUM_SCALAR> becomes an Output node we must update any the IO flags of every de...
virtual const PRMClassElement< GUM_SCALAR > & get(NodeId id) const =0
Constant getter on a member of this PRMClassElementContainer.
HashTable< std::string, std::pair< bool, bool > > _IOFlags_
input / output flags, useful when inheriting or copying.
friend class PRMClassElementContainterConstIterator
virtual DAG & dag_()=0
Returns a non constant reference over this PRMClassElementContainer's DAG.
virtual bool isSubTypeOf(const PRMClassElementContainer< GUM_SCALAR > &cec) const =0
Test if this PRMClassElementContainer is a subtype of cec.
virtual PRMClassElement< GUM_SCALAR > & operator[](NodeId id)=0
Getter on a member of this PRMClassElementContainer.
virtual NodeId add(PRMClassElement< GUM_SCALAR > *elt)=0
Add a PRMClassElement<GUM_SCALAR> to this PRMClassElementContainer.
virtual void addArc(std::string_view tail, std::string_view head)=0
Add an arc between two PRMClassElement<GUM_SCALAR>.
virtual bool isOutputNode(const PRMClassElement< GUM_SCALAR > &elt) const =0
Returns true if the node is an output node.
virtual void setIOFlag_(const PRMClassElement< GUM_SCALAR > &elt, const std::pair< bool, bool > &flags)
Defines the IO flags of a PRMClassElement<GUM_SCALAR>.
~PRMClassElementContainer() override
Destructor.
virtual bool isInputNode(const PRMClassElement< GUM_SCALAR > &elt) const
Returns true if the node is an input node.
virtual bool isInnerNode(const PRMClassElement< GUM_SCALAR > &elt) const
Returns true if the node is an inner node.
virtual void setInputNode(const PRMClassElement< GUM_SCALAR > &elt, bool b)
Set the input flag value of id at b.
PRMClassElementContainer< GUM_SCALAR > & operator=(const PRMClassElementContainer< GUM_SCALAR > &source)
Copy operator. Don't use it.
virtual void setOutputNode(const PRMClassElement< GUM_SCALAR > &elt, bool b)
Set the output flag value of id at b.
virtual bool belongsTo(const PRMClassElement< GUM_SCALAR > &elt) const
Returns true if elt belongs to this PRMClassElementContainer.
virtual PRMClassElement< GUM_SCALAR > & get(std::string_view name)=0
Getter on a member of this PRMClassElementContainer.
virtual const DAG & dag_() const =0
virtual const PRMClassElement< GUM_SCALAR > & get(std::string_view name) const =0
Constant getter on a member of this PRMClassElementContainer.
virtual const PRMClassElement< GUM_SCALAR > & operator[](std::string_view name) const =0
Constant getter on a member of this PRMClassElementContainer.
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...
An PRMInterface is implemented by a Class<GUM_SCALAR> and defines a set of PRMReferenceSlot<GUM_SCALA...
PRMObject(std::string_view name)
Constructor.
const std::string & name() const
Returns the name of this object.
Size NodeId
Type for node ids.
namespace for all probabilistic relational models entities
gum is the global namespace for all aGrUM entities