55 #ifndef GUM_LEARNING_GRAPH_CHANGES_GENERATOR_4_UNDIGRAPH_H 56 #define GUM_LEARNING_GRAPH_CHANGES_GENERATOR_4_UNDIGRAPH_H 58 #include <agrum/agrum.h> 59 #include <agrum/tools/core/OMPThreads.h> 60 #include <agrum/tools/core/set.h> 61 #include <agrum/tools/graphs/undiGraph.h> 62 #include <agrum/BN/learning/structureUtils/IGraphChangesGenerator4UndiGraph.h> 63 #include <agrum/BN/learning/structureUtils/graphChange.h> 109 template <
typename STRUCT_CONSTRAINT >
172 STRUCT_CONSTRAINT&
constraint()
const noexcept;
175 void setGraph(
const UndiGraph& graph);
212 #if defined(_OPENMP) && !defined(GUM_DEBUG_MODE) 224 #include <agrum/BN/learning/structureUtils/graphChangesGenerator4UndiGraph_tpl.h> STRUCT_CONSTRAINT * constraint_
a reference on the structural constraint used to restrict the changes
The basic class for computing the next graph changes possible in an undirected structure learning alg...
void notifyGetCompleted()
notifies the generator that we have parsed all its legal changes
void setGraph(const UndiGraph &graph)
sets a new graph from which the operator will compute possible changes
INLINE void emplace(Args &&... args)
GraphChangesGenerator4UndiGraph< STRUCT_CONSTRAINT > & operator=(GraphChangesGenerator4UndiGraph< STRUCT_CONSTRAINT > &&from)
move operator
virtual ~GraphChangesGenerator4UndiGraph()
destructor
iterator begin() const
returns an (unsafe) iterator on the beginning of the list of operators
void createChanges_()
create the set of legal and illegal changes from a given graph
GraphChangesGenerator4UndiGraph(STRUCT_CONSTRAINT &constraint)
default constructor
void clearChanges() noexcept
empty the set of possible change operators that can be applied
GraphChangesGenerator4UndiGraph(GraphChangesGenerator4UndiGraph< STRUCT_CONSTRAINT > &&from)
move operator
void modifyGraph(const GraphChange &change)
notify the operator set of a change applied to the graph
void setMaxNbThreads(Size nb) noexcept
sets the maximum number of threads used to compute the set of changes
GraphChangesGenerator4UndiGraph(const GraphChangesGenerator4UndiGraph< STRUCT_CONSTRAINT > &from)
copy constructor
STRUCT_CONSTRAINT & constraint() const noexcept
returns the constraint that is used by the generator
GraphChangesGenerator4UndiGraph< STRUCT_CONSTRAINT > & operator=(const GraphChangesGenerator4UndiGraph< STRUCT_CONSTRAINT > &from)
copy operator
UndiGraph graph_
the graph on which we generate operators
Database(const std::string &filename, const BayesNet< GUM_SCALAR > &bn, const std::vector< std::string > &missing_symbols)
Size _max_threads_number_
the max number of threads authorized
Set< GraphChange > legal_changes_
the current set of operators
const iterator & end() const
returns an (unsafe) iterator on the end of the list of operators