aGrUM  0.16.0
structuralConstraintDAG.cpp
Go to the documentation of this file.
1 
29 
31 #ifdef GUM_NO_INLINE
33 #endif /* GUM_NO_INLINE */
34 
35 namespace gum {
36 
37  namespace learning {
38 
41  GUM_CONSTRUCTOR(StructuralConstraintDAG);
42  }
43 
46  StructuralConstraintDiGraph(nb_nodes) {
48 
49  DAG g;
50  for (NodeId i = 0; i < nb_nodes; ++i) {
51  g.addNodeWithId(i);
52  }
54 
55  GUM_CONSTRUCTOR(StructuralConstraintDAG);
56  }
57 
62 
63  GUM_CONSTRUCTOR(StructuralConstraintDAG);
64  }
65 
68  const StructuralConstraintDAG& from) :
71  GUM_CONS_CPY(StructuralConstraintDAG);
72  }
73 
76  StructuralConstraintDAG&& from) :
77  StructuralConstraintDiGraph(std::move(from)),
79  GUM_CONS_MOV(StructuralConstraintDAG);
80  }
81 
84  GUM_DESTRUCTOR(StructuralConstraintDAG);
85  }
86 
90  if (this != &from) {
93  }
94  return *this;
95  }
96 
100  if (this != &from) {
102  _DAG__cycle_detector = std::move(from._DAG__cycle_detector);
103  }
104  return *this;
105  }
106 
107  } /* namespace learning */
108 
109 } /* namespace gum */
virtual void addNodeWithId(const NodeId id)
try to insert a node with the given id
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
void setGraph(Size nb_nodes)
sets a new empty graph from which we will perform checkings
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
STL namespace.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Definition: agrum.h:25
StructuralConstraintDiGraph & operator=(const StructuralConstraintDiGraph &from)
copy operator
void setDAG(const DAG &dag)
sets the initial DAG from which changes shall be applied
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Definition: types.h:48
StructuralConstraintDAG & operator=(const StructuralConstraintDAG &from)
copy operator
Base class for dag.
Definition: DAG.h:102
The base class for structural constraints used by learning algorithms that learn a directed graph str...
Size NodeId
Type for node ids.
Definition: graphElements.h:98
DAGCycleDetector _DAG__cycle_detector
the cycle detector used to check quickly graph modifications
The base class for structural constraints imposed by DAGs.