aGrUM  0.17.2
a C++ library for (probabilistic) graphical models
UGmodel_inl.h
Go to the documentation of this file.
1 
33 
34 namespace gum {
35  INLINE
36  const UndiGraph& UGmodel::graph() const { return _graph; }
37 
38  INLINE
39  Size UGmodel::size() const { return graph().size(); }
40 
41  INLINE
42  Size UGmodel::sizeEdges() const { return _graph.sizeEdges(); }
43 
44  INLINE const EdgeSet& UGmodel::edges() const { return _graph.edges(); }
45 
46  INLINE const NodeSet& UGmodel::neighbours(const NodeId id) const {
47  return _graph.neighbours(id);
48  }
49  INLINE const NodeSet& UGmodel::neighbours(const std::string& name) const {
50  return neighbours(idFromName(name));
51  }
52 
53  INLINE const NodeGraphPart& UGmodel::nodes() const {
54  return (NodeGraphPart&)_graph;
55  }
56 } /* namespace gum */
Copyright 2005-2020 Pierre-Henri WUILLEMIN () et Christophe GONZALES () info_at_agrum_dot_org.
UndiGraph _graph
The DAG of this Directed Graphical Model.
Definition: UGmodel.h:137
virtual NodeId idFromName(const std::string &name) const =0
Getter by name.
const NodeSet & neighbours(const NodeId id) const
returns the neighbours of a node as set of nodes
Definition: UGmodel_inl.h:46
const EdgeSet & edges() const
returns the neighbours of a node as set of nodes
Definition: UGmodel_inl.h:44
Size size() const
alias for sizeNodes
Copyright 2005-2020 Pierre-Henri WUILLEMIN () et Christophe GONZALES () info_at_agrum_dot_org.
Definition: agrum.h:25
const NodeSet & neighbours(const NodeId id) const
returns the set of edges adjacent to a given node
const EdgeSet & edges() const
returns the set of edges stored within the EdgeGraphPart
const NodeGraphPart & nodes() const
Returns a constant reference to the dag of this Bayes Net.
Definition: UGmodel_inl.h:53
Class for node sets in graph.
Size sizeEdges() const
Returns the number of arcs in this Directed Graphical Model.
Definition: UGmodel_inl.h:42
const UndiGraph & graph() const
Returns a constant reference to the dag of this Bayes Net.
Definition: UGmodel_inl.h:36
Base class for undirected graphs.
Definition: undiGraph.h:109
Size sizeEdges() const
indicates the number of edges stored within the EdgeGraphPart
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Definition: types.h:48
Copyright 2005-2020 Pierre-Henri WUILLEMIN () et Christophe GONZALES () info_at_agrum_dot_org.
Size NodeId
Type for node ids.
Definition: graphElements.h:98
virtual Size size() const final
Returns the number of variables in this Directed Graphical Model.
Definition: UGmodel_inl.h:39