aGrUM  0.17.2
a C++ library for (probabilistic) graphical models
DAGmodel_inl.h
Go to the documentation of this file.
1 
33 
34 namespace gum {
35  INLINE
36  const DAG& DAGmodel::dag() const { return _dag; }
37 
38  INLINE
39  Size DAGmodel::size() const { return dag().size(); }
40 
41  INLINE
42  Size DAGmodel::sizeArcs() const { return _dag.sizeArcs(); }
43 
44  INLINE const ArcSet& DAGmodel::arcs() const { return _dag.arcs(); }
45 
46  INLINE const NodeSet& DAGmodel::parents(const NodeId id) const {
47  return _dag.parents(id);
48  }
49  INLINE const NodeSet& DAGmodel::parents(const std::string& name) const {
50  return parents(idFromName(name));
51  }
52 
53  INLINE const NodeSet& DAGmodel::children(const NodeId id) const {
54  return _dag.children(id);
55  }
56  INLINE const NodeSet& DAGmodel::children(const std::string& name) const {
57  return _dag.children(idFromName(name));
58  }
59 
60  INLINE const NodeGraphPart& DAGmodel::nodes() const {
61  return (NodeGraphPart&)_dag;
62  }
63 } /* namespace gum */
Copyright 2005-2020 Pierre-Henri WUILLEMIN () et Christophe GONZALES () info_at_agrum_dot_org.
const ArcSet & arcs() const
returns the set of nodes with arc ingoing to a given node
Definition: DAGmodel_inl.h:44
const NodeSet & children(const NodeId id) const
returns the set of nodes with arc outgoing from a given node
Definition: DAGmodel_inl.h:53
const NodeSet & parents(const NodeId id) const
returns the set of nodes with arc ingoing to a given node
Definition: DAGmodel_inl.h:46
Size sizeArcs() const
Returns the number of arcs in this Directed Graphical Model.
Definition: DAGmodel_inl.h:42
Size size() const
alias for sizeNodes
virtual Size size() const final
Returns the number of variables in this Directed Graphical Model.
Definition: DAGmodel_inl.h:39
Copyright 2005-2020 Pierre-Henri WUILLEMIN () et Christophe GONZALES () info_at_agrum_dot_org.
Definition: agrum.h:25
virtual NodeId idFromName(const std::string &name) const =0
Getter by name.
DAG _dag
The DAG of this Directed Graphical Model.
Definition: DAGmodel.h:162
Copyright 2005-2020 Pierre-Henri WUILLEMIN () et Christophe GONZALES () info_at_agrum_dot_org.
Size sizeArcs() const
indicates the number of arcs stored within the ArcGraphPart
const NodeGraphPart & nodes() const
Returns a constant reference to the dag of this Bayes Net.
Definition: DAGmodel_inl.h:60
const NodeSet & parents(const NodeId id) const
returns the set of nodes with arc ingoing to a given node
Class for node sets in graph.
const NodeSet & children(const NodeId id) const
returns the set of nodes with arc outgoing from a given node
const ArcSet & arcs() const
returns the set of arcs stored within the ArcGraphPart
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Definition: types.h:48
Base class for dag.
Definition: DAG.h:102
const DAG & dag() const
Returns a constant reference to the dag of this Bayes Net.
Definition: DAGmodel_inl.h:36
Size NodeId
Type for node ids.
Definition: graphElements.h:98