109 bool exists(
const std::string& name)
const final;
125 bool existsArc(
const std::string& nametail,
const std::string& namehead)
const;
203 const std::string& Yname,
204 const std::vector< std::string >& Znames)
const {
209 const std::vector< std::string >& Ynames,
210 const std::vector< std::string >& Znames)
const {
253 const std::vector< std::string >& soids)
const;
262 const std::vector< std::string >& soids)
const;
Interface-like class encapsulating basic functionalities for a DAGModel.
Virtual base class for PGMs using a DAG.
const DAG & dag() const
Returns a constant reference to the dag of this Bayes Net.
NodeSet family(const NodeId id) const final
returns the parents of a node and the node
DAG dag_
The DAG of this Directed Graphical Model.
DAGmodel()
Default constructor.
const ArcSet & arcs() const
return true if the arc tail->head exists in the DAGmodel
virtual Size size() const final
Returns the number of variables in this Directed Graphical Model.
Size sizeArcs() const
Returns the number of arcs in this Directed Graphical Model.
Sequence< NodeId > topologicalOrder() const
The topological order stays the same as long as no variable or arcs are added or erased src the topol...
NodeSet minimalCondSet(NodeId target, const NodeSet &soids) const
bool existsArc(const NodeId tail, const NodeId head) const
return true if the arc tail->head exists in the DAGmodel
bool hasSameStructure(const DAGmodel &other)
bool isIndependent(const std::vector< std::string > &Xnames, const std::vector< std::string > &Ynames, const std::vector< std::string > &Znames) const
build a UndiGraph by moralizing the Ancestral Graph of a set of Nodes
UndiGraph moralizedAncestralGraph(const NodeSet &nodes) const
build a UndiGraph by moralizing the Ancestral Graph of a set of Nodes
const NodeSet & children(const NodeId id) const
returns the set of nodes with arc outgoing from a given node
DAGmodel & operator=(const DAGmodel &source)
Private copy operator.
bool exists(NodeId node) const final
Return true if this node exists in this graphical model.
const NodeSet & parents(const NodeId id) const
returns the set of nodes with arc ingoing to a given node
UndiGraph moralGraph() const
The node's id are coherent with the variables and nodes of the topology.
bool isIndependent(NodeId X, NodeId Y, const NodeSet &Z) const final
check if node X and node Y are independent given nodes Z
NodeSet descendants(const NodeId id) const
returns the set of nodes with directed path outgoing from a given node
virtual ~DAGmodel()
Destructor.
const NodeGraphPart & nodes() const final
Returns a constant reference to the dag of this Bayes Net.
bool isIndependent(const std::string &Xname, const std::string &Yname, const std::vector< std::string > &Znames) const
build a UndiGraph by moralizing the Ancestral Graph of a set of Nodes
NodeSet ancestors(const NodeId id) const
returns the set of nodes with directed path ingoing to a given node
std::vector< NodeId > ids(const std::vector< std::string > &names) const
transform a vector of names into a vector of nodeId
std::vector< std::string > names(const std::vector< NodeId > &ids) const
transform a vector of NodeId in a vector of names
GraphicalModel()
Default constructor.
virtual NodeId idFromName(const std::string &name) const =0
Getter by name.
NodeSet nodeset(const std::vector< std::string > &names) const
transform a vector of names into a NodeSet
Class for node sets in graph.
Base class for undirected graphs.
Class representing probabilistic DAG model.
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Size NodeId
Type for node ids.
Set< Arc > ArcSet
Some typdefs and define for shortcuts ...
Set< NodeId > NodeSet
Some typdefs and define for shortcuts ...
gum is the global namespace for all aGrUM entities