aGrUM  0.16.0
DAG.h
Go to the documentation of this file.
1 
28 #ifndef GUM_DAG_H
29 #define GUM_DAG_H
30 
31 #include <agrum/graphs/undiGraph.h>
32 #include <agrum/graphs/diGraph.h>
33 
34 namespace gum {
35 
36  /* ====================================================================== */
37  /* === BASE CLASS FOR MANIPULATING GRAPHS WITH BOTH EDGES AND ARCS */
38  /* ====================================================================== */
101  /* ====================================================================== */
102  class DAG : public DiGraph {
103  public:
104  // ############################################################################
106  // ############################################################################
108 
110 
116  explicit DAG(Size nodes_size = HashTableConst::default_size,
117  bool nodes_resize_policy = true,
119  bool arcs_resize_policy = true);
120 
122 
123  DAG(const DAG& g);
124 
126  virtual ~DAG();
127 
129 
130  // ############################################################################
132  // ############################################################################
134 
136 
137  DAG& operator=(const DAG& g);
138 
140 
141  // ############################################################################
143  // ############################################################################
145 
147 
158  virtual void addArc(const NodeId tail, const NodeId head);
160 
161  UndiGraph moralGraph() const;
162  };
163 
164 } /* namespace gum */
165 
166 #ifndef GUM_NO_INLINE
167 # include <agrum/graphs/DAG_inl.h>
168 #endif // GUM_NOINLINE
169 
170 #endif /* GUM_DAG_H */
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
UndiGraph moralGraph() const
Definition: DAG.cpp:52
static constexpr Size default_size
The default number of slots in hashtables.
Definition: hashTable.h:80
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
DAG & operator=(const DAG &g)
copy operator
Definition: DAG_inl.h:36
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Definition: agrum.h:25
virtual ~DAG()
destructor
Definition: DAG.cpp:50
DAG(Size nodes_size=HashTableConst::default_size, bool nodes_resize_policy=true, Size arcs_size=HashTableConst::default_size, bool arcs_resize_policy=true)
default constructor
Definition: DAG.cpp:38
Base class for all oriented graphs.
Definition: diGraph.h:111
virtual void addArc(const NodeId tail, const NodeId head)
insert a new arc into the directed graph
Definition: DAG_inl.h:43
Base class for undirected graphs.
Definition: undiGraph.h:109
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Definition: types.h:48
Base class for dag.
Definition: DAG.h:102
Size NodeId
Type for node ids.
Definition: graphElements.h:98