36 #ifndef GUM_LEARNING_STRUCTURAL_CONSTRAINT_TABU_LIST_H 37 #define GUM_LEARNING_STRUCTURAL_CONSTRAINT_TABU_LIST_H 41 #include <agrum/agrum.h> 42 #include <agrum/tools/core/bijection.h> 43 #include <agrum/BN/learning/constraints/structuralConstraint.h> 44 #include <agrum/BN/learning/structureUtils/graphChange.h> 46 #define GUM_STRUCTURAL_CONSTRAINT_TABU_LIST_DEFAULT_SIZE 2
196 #ifndef DOXYGEN_SHOULD_SKIP_THIS 200 # define GUM_CONSTRAINT_CLASS_NAME StructuralConstraintTabuList 201 # include <agrum/BN/learning/constraints/structuralConstraintPatternHeader.h> 202 # undef GUM_CONSTRAINT_CLASS_NAME 218 #ifndef GUM_NO_INLINE 219 # include <agrum/BN/learning/constraints/structuralConstraintTabuList_inl.h> INLINE void emplace(Args &&... args)
void setTabuListSize(Size new_size)
sets the size of the tabu list
StructuralConstraintTabuList & operator=(StructuralConstraintTabuList &&from)
move operator
NodeId _TabuList_offset_
the index of the oldest element
virtual ~StructuralConstraintTabuList()
destructor
void setGraphAlone(const DiGraph &graph)
sets a new graph from which we will perform checkings
StructuralConstraintTabuList(const StructuralConstraintTabuList &from)
copy constructor
bool checkArcReversalAlone(NodeId x, NodeId y) const
checks whether the constraints enable to reverse arc (x,y)
StructuralConstraintTabuList & operator=(const StructuralConstraintTabuList &from)
copy operator
bool checkArcDeletionAlone(NodeId x, NodeId y) const
checks whether the constraints enable to remove arc (x,y)
StructuralConstraintTabuList(const DiGraph &graph)
constructor starting with a given graph
StructuralConstraintTabuList(StructuralConstraintTabuList &&from)
move constructor
bool isAlwaysInvalidAlone(const GraphChange &change) const
indicates whether a change will always violate the constraint
The class imposing a N-sized tabu list as a structural constraints for learning algorithms.
bool checkModificationAlone(const ArcReversal &change) const
checks whether the constraints enable to reverse an arc
Database(const std::string &filename, const BayesNet< GUM_SCALAR > &bn, const std::vector< std::string > &missing_symbols)
StructuralConstraintTabuList()
default constructor
Bijection< GraphChange, NodeId > _TabuList_changes_
the tabu list
bool checkArcAdditionAlone(NodeId x, NodeId y) const
checks whether the constraints enable to add arc (x,y)
void modifyGraphAlone(const GraphChange &change)
notify the constraint of a modification of the graph