aGrUM  0.16.0
structuralConstraintTabuList.cpp
Go to the documentation of this file.
1 
31 
33 #ifdef GUM_NO_INLINE
35 #endif /* GUM_NO_INLINE */
36 
37 namespace gum {
38 
39  namespace learning {
40 
44  // put dummy elements into the list (this avoids having tests to do
45  // afterwards)
47  ++i) {
48  _TabuList__changes.insert(
49  ArcAddition(std::numeric_limits< NodeId >::max() - i,
50  std::numeric_limits< NodeId >::max()),
51  i);
52  }
53 
54  GUM_CONSTRUCTOR(StructuralConstraintTabuList);
55  }
56 
59  const DiGraph& graph) :
61  // put dummy elements into the list (this avoids having tests to do
62  // afterwards)
64  ++i) {
65  _TabuList__changes.insert(
66  ArcAddition(std::numeric_limits< NodeId >::max() - i,
67  std::numeric_limits< NodeId >::max()),
68  i);
69  }
70 
71  GUM_CONSTRUCTOR(StructuralConstraintTabuList);
72  }
73 
76  const StructuralConstraintTabuList& from) :
79  GUM_CONS_CPY(StructuralConstraintTabuList);
80  }
81 
87  GUM_CONS_MOV(StructuralConstraintTabuList);
88  }
89 
92  GUM_DESTRUCTOR(StructuralConstraintTabuList);
93  }
94 
98  if (this != &from) {
101  }
102  return *this;
103  }
104 
108  if (this != &from) {
109  _TabuList__changes = std::move(from._TabuList__changes);
110  _TabuList__offset = std::move(from._TabuList__offset);
111  }
112  return *this;
113  }
114 
115  } /* namespace learning */
116 
117 } /* namespace gum */
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
The class for notifying learning algorithms of new arc additionsThis class is convenient to know at c...
Definition: graphChange.h:150
#define GUM_STRUCTURAL_CONSTRAINT_TABU_LIST_DEFAULT_SIZE
STL namespace.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Definition: agrum.h:25
NodeId _TabuList__offset
the index of the oldest element
StructuralConstraintTabuList & operator=(const StructuralConstraintTabuList &from)
copy operator
Base class for all oriented graphs.
Definition: diGraph.h:111
Bijection< GraphChange, NodeId > _TabuList__changes
the tabu list
The class imposing a N-sized tabu list as a structural constraints for learning algorithms.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Size NodeId
Type for node ids.
Definition: graphElements.h:98