49#ifndef GUM_CLASS_ELEMENT_CONTAINER_H
50#define GUM_CLASS_ELEMENT_CONTAINER_H
58 template <
typename GUM_SCALAR >
60 template <
typename GUM_SCALAR >
62 class PRMClassElementContainterIterator;
63 class PRMClassElementContainterConstIterator;
78 template <
typename GUM_SCALAR >
113 virtual bool exists(
const std::string&
name)
const;
196 virtual void addArc(
const std::string& tail,
const std::string& head) = 0;
425 virtual const std::pair< bool, bool >&
434 const std::pair< bool, bool >& flags);
455#ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
466template <
typename 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.
friend class PRMClassElementContainterIterator
virtual PRMClassElement< GUM_SCALAR > & get(NodeId id)=0
Getter on a member of this PRMClassElementContainer.
virtual NodeId overload(PRMClassElement< GUM_SCALAR > *elt)=0
Add a PRMClassElement<GUM_SCALAR> which overload an inherited PRMClassElement<GUM_SCALAR>.
virtual PRMClassElement< GUM_SCALAR > & get(const std::string &name)=0
Getter on a member of this PRMClassElementContainer.
virtual const PRMClassElement< GUM_SCALAR > & operator[](NodeId id) const =0
Constant getter on a member of this PRMClassElementContainer.
virtual bool isInnerNode(const PRMClassElement< GUM_SCALAR > &elt) const
Returns true if the node is an inner node.
virtual const DAG & containerDag() const
Returns the gum::DAG of this PRMClassElementContainer.
virtual std::pair< bool, bool > & getIOFlag_(const PRMClassElement< GUM_SCALAR > &elt)
Returns the IO flags of a PRMClassElement<GUM_SCALAR>.
virtual void addArc(const std::string &tail, const std::string &head)=0
Add an arc between two PRMClassElement<GUM_SCALAR>.
virtual void copyIOFlags_(const PRMClassElementContainer< GUM_SCALAR > &c)
Copy the IO Flags of c in this PRMClassElementContainer.
PRMClassElementContainer< GUM_SCALAR > & operator=(const PRMClassElementContainer< GUM_SCALAR > &source)
Copy operator. Don't use it.
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 bool belongsTo(const PRMClassElement< GUM_SCALAR > &elt) const
Returns true if elt belongs to this PRMClassElementContainer.
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 bool isSuperTypeOf(const PRMClassElementContainer< GUM_SCALAR > &cec) const
Test if this PRMClassElementContainer is a super type of cec.
virtual ~PRMClassElementContainer()
Destructor.
virtual NodeId add(PRMClassElement< GUM_SCALAR > *elt)=0
Add a PRMClassElement<GUM_SCALAR> to this PRMClassElementContainer.
virtual void setIOFlag_(const PRMClassElement< GUM_SCALAR > &elt, const std::pair< bool, bool > &flags)
Defines the IO flags of a PRMClassElement<GUM_SCALAR>.
virtual bool isOutputNode(const PRMClassElement< GUM_SCALAR > &elt) const =0
Returns true if the node is an output node.
PRMClassElementContainer(const std::string &name)
Default constructor.
virtual bool isInputNode(const PRMClassElement< GUM_SCALAR > &elt) const
Returns true if the node is an input node.
virtual const PRMClassElement< GUM_SCALAR > & operator[](const std::string &name) const =0
Constant getter on a member of this PRMClassElementContainer.
virtual bool exists(const std::string &name) const
Returns true if a member with the given name exists in this PRMClassElementContainer or in the PRMCla...
virtual PRMClassElement< GUM_SCALAR > & operator[](const std::string &name)=0
Getter on a member of this PRMClassElementContainer.
virtual void setInputNode(const PRMClassElement< GUM_SCALAR > &elt, bool b)
Set the input flag value of id at b.
virtual void setOutputNode(const PRMClassElement< GUM_SCALAR > &elt, bool b)
Set the output flag value of id at b.
virtual const PRMClassElement< GUM_SCALAR > & get(const std::string &name) const =0
Constant getter on a member of this PRMClassElementContainer.
virtual const DAG & dag_() const =0
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...
const std::string & name() const
Returns the name of this object.
PRMObject(const std::string &name)
Constructor.
Size NodeId
Type for node ids.
namespace for all probabilistic relational models entities
gum is the global namespace for all aGrUM entities