aGrUM  0.14.2
IGraphChangesGenerator4DiGraph.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2005 by Christophe GONZALES and Pierre-Henri WUILLEMIN *
3  * {prenom.nom}@lip6.fr *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it wil be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  ***************************************************************************/
25 #ifndef GUM_LEARNING_IGRAPH_CHANGES_GENERATOR_4_DIGRAPH_H
26 #define GUM_LEARNING_IGRAPH_CHANGES_GENERATOR_4_DIGRAPH_H
27 
28 #include <agrum/agrum.h>
29 #include <agrum/core/set.h>
30 #include <agrum/graphs/diGraph.h>
32 
33 namespace gum {
34 
35  namespace learning {
36 
38  public:
41 
44 
45  // ##########################################################################
47  // ##########################################################################
49 
51  virtual iterator begin() const = 0;
52 
54  virtual const iterator& end() const = 0;
55 
57 
58  // ##########################################################################
60  // ##########################################################################
62 
64  virtual void setGraph(const DiGraph& graph) = 0;
65 
67  virtual void modifyGraph(const ArcAddition& change) = 0;
68 
70  virtual void modifyGraph(const ArcDeletion& change) = 0;
71 
73  virtual void modifyGraph(const ArcReversal& change) = 0;
74 
76  virtual void modifyGraph(const GraphChange& change) = 0;
77 
79  virtual void clearChanges() noexcept = 0;
80 
82  virtual void notifyGetCompleted() = 0;
83 
85  };
86 
87  } /* namespace learning */
88 
89 } /* namespace gum */
90 
91 #endif /* GUM_LEARNING_IGRAPH_CHANGES_GENERATOR_4_DIGRAPH_H */
Base classes for oriented graphs.
virtual void setGraph(const DiGraph &graph)=0
sets a new graph from which the operator will compute possible changes
Sets of elements (i.e.
the classes to account for structure changes in a graph
The class for notifying learning algorithms of new arc additionsThis class is convenient to know at c...
Definition: graphChange.h:147
The class for notifying learning algorithms of arc removalsThis class is convenient to know at compil...
Definition: graphChange.h:213
gum is the global namespace for all aGrUM entities
Definition: agrum.h:25
iterator const_iterator
the const iterator for parsing the list of graph change operators
Base class for all oriented graphs.
Definition: diGraph.h:108
virtual iterator begin() const =0
returns an (unsafe) iterator on the beginning of the list of operators
Unsafe iterators for the Set class.
Definition: set.h:1022
virtual const iterator & end() const =0
returns an (unsafe) iterator on the end of the list of operators
typename Set< GraphChange >::const_iterator iterator
the iterator for parsing the list of possible graph change operators
The class for notifying learning algorithms of arc reversalsThis class is convenient to know at compi...
Definition: graphChange.h:279
virtual void clearChanges() noexcept=0
empty the set of possible change operators that can be applied
virtual void notifyGetCompleted()=0
notifies the generator that we have parsed all its legal changes
virtual void modifyGraph(const ArcAddition &change)=0
notify the operator set of a change applied to the graph