60 #ifndef GUM_LEARNING_GRAPH_CHANGES_GENERATOR_4_DIGRAPH_H 61 #define GUM_LEARNING_GRAPH_CHANGES_GENERATOR_4_DIGRAPH_H 63 #include <agrum/agrum.h> 64 #include <agrum/tools/core/OMPThreads.h> 65 #include <agrum/tools/core/set.h> 66 #include <agrum/tools/graphs/diGraph.h> 67 #include <agrum/BN/learning/structureUtils/IGraphChangesGenerator4DiGraph.h> 68 #include <agrum/BN/learning/structureUtils/graphChange.h> 115 template <
typename STRUCT_CONSTRAINT >
177 STRUCT_CONSTRAINT&
constraint()
const noexcept;
181 void setGraph(
const DiGraph& graph);
221 #if defined(_OPENMP) && !defined(GUM_DEBUG_MODE) 233 #include <agrum/BN/learning/structureUtils/graphChangesGenerator4DiGraph_tpl.h> STRUCT_CONSTRAINT * constraint_
the structural constraint used to restrict the changes
void modifyGraph(const GraphChange &change)
notify the generator of a change applied to the graph
GraphChangesGenerator4DiGraph< STRUCT_CONSTRAINT > & operator=(GraphChangesGenerator4DiGraph< STRUCT_CONSTRAINT > &&from)
move operator
Size _max_threads_number_
the max number of threads authorized
INLINE void emplace(Args &&... args)
void createChanges_()
create the set of legal and illegal changes from a given graph
void setMaxNbThreads(Size nb) noexcept
sets the maximum number of threads used to compute the set of changes
void setGraph(const DiGraph &graph)
sets a new graph from which the generator will compute possible changes
DiGraph graph_
the graph on which we generate operators
const iterator & end() const
returns an (unsafe) iterator on the end of the list of operators
iterator begin() const
returns an (unsafe) iterator on the beginning of the list of operators
virtual ~GraphChangesGenerator4DiGraph()
destructor
The basic class for computing the next graph changes possible in a structure learning algorithm...
STRUCT_CONSTRAINT & constraint() const noexcept
returns the constraint that is used by the generator
GraphChangesGenerator4DiGraph(const GraphChangesGenerator4DiGraph< STRUCT_CONSTRAINT > &from)
copy constructor
GraphChangesGenerator4DiGraph< STRUCT_CONSTRAINT > & operator=(const GraphChangesGenerator4DiGraph< STRUCT_CONSTRAINT > &from)
copy operator
GraphChangesGenerator4DiGraph(STRUCT_CONSTRAINT &constraint)
default constructor
void clearChanges() noexcept
empty the set of possible change operators that can be applied
Set< GraphChange > legal_changes_
the current set of graph changes
void notifyGetCompleted()
notifies the generator that we have parsed all its legal changes
Database(const std::string &filename, const BayesNet< GUM_SCALAR > &bn, const std::vector< std::string > &missing_symbols)
GraphChangesGenerator4DiGraph(GraphChangesGenerator4DiGraph< STRUCT_CONSTRAINT > &&from)
move operator