aGrUM  0.14.2
IGraphChangesGenerator4UndiGraph.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  ***************************************************************************/
26 #ifndef GUM_LEARNING_IGRAPH_CHANGES_GENERATOR_4_UNDIGRAPH_H
27 #define GUM_LEARNING_IGRAPH_CHANGES_GENERATOR_4_UNDIGRAPH_H
28 
29 #include <agrum/agrum.h>
30 #include <agrum/core/set.h>
31 #include <agrum/graphs/undiGraph.h>
33 
34 namespace gum {
35 
36  namespace learning {
37 
39  public:
42 
45 
46  // ##########################################################################
48  // ##########################################################################
50 
52  virtual iterator begin() const = 0;
53 
55  virtual const iterator& end() const = 0;
56 
58 
59  // ##########################################################################
61  // ##########################################################################
63 
65  virtual void setGraph(const UndiGraph& graph) = 0;
66 
68  virtual void modifyGraph(const EdgeAddition& change) = 0;
69 
71  virtual void modifyGraph(const EdgeDeletion& change) = 0;
72 
74  virtual void modifyGraph(const GraphChange& change) = 0;
75 
77  virtual void clearChanges() noexcept = 0;
78 
80  virtual void notifyGetCompleted() = 0;
81 
83  };
84 
85  } /* namespace learning */
86 
87 } /* namespace gum */
88 
89 #endif /* GUM_LEARNING_IGRAPH_CHANGES_GENERATOR_4_UNDIGRAPH_H */
virtual void setGraph(const UndiGraph &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
virtual void notifyGetCompleted()=0
notifies the generator that we have parsed all its legal changes
virtual void clearChanges() noexcept=0
empty the set of possible change operators that can be applied
Base classes for undirected graphs.
gum is the global namespace for all aGrUM entities
Definition: agrum.h:25
The class for notifying learning algorithms of edge removalsThis class is convenient to know at compi...
Definition: graphChange.h:411
The class for notifying learning algorithms of new edge additionsThis class is convenient to know at ...
Definition: graphChange.h:345
virtual void modifyGraph(const EdgeAddition &change)=0
notify the operator set of a change applied to the graph
iterator const_iterator
the const iterator for parsing the list of graph change operators
typename Set< GraphChange >::const_iterator iterator
the iterator for parsing the list of possible graph change operators
Unsafe iterators for the Set class.
Definition: set.h:1022
Base class for undirected graphs.
Definition: undiGraph.h:106
virtual iterator begin() const =0
returns an (unsafe) iterator on the beginning of the list of operators
virtual const iterator & end() const =0
returns an (unsafe) iterator on the end of the list of operators