aGrUM  0.16.0
edgeGrowth.h
Go to the documentation of this file.
1 
30 #ifndef GUM_EDGE_GROWTH_H
31 #define GUM_EDGE_GROWTH_H
32 
33 #include <list>
34 #include <ostream>
35 #include <utility>
36 #include <vector>
37 
38 #include <agrum/core/math/math.h>
39 #include <agrum/core/bijection.h>
40 #include <agrum/core/sequence.h>
41 #include <agrum/core/set.h>
42 
43 #include <agrum/graphs/diGraph.h>
44 
46 
49 
50 namespace gum {
51  namespace prm {
52  namespace gspan {
53  template < typename GUM_SCALAR >
54  class DFSTree;
55 
62  template < typename GUM_SCALAR >
63  class EdgeGrowth {
64  public:
65  friend class DFSTree< GUM_SCALAR >;
67  EdgeGrowth(NodeId a_u,
68  LabelData* an_edge,
69  LabelData* a_l_v,
70  NodeId a_v = 0);
72  EdgeGrowth(const EdgeGrowth& from);
74  ~EdgeGrowth();
89  std::pair< PRMInstance< GUM_SCALAR >*, PRMInstance< GUM_SCALAR >* > >
92  std::string toString();
93 
94  private:
98  std::vector< NodeId >* degree_list;
101  };
102 
103  template < typename GUM_SCALAR >
104  std::ostream& operator<<(std::ostream& out,
106 
107 
108 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
109  extern template class EdgeGrowth< double >;
110 #endif
111 
112 
113  } /* namespace gspan */
114  } /* namespace prm */
115 } /* namespace gum */
116 
118 
119 #endif /* GUM_EDGE_GROWTH_H */
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Set< NodeId > max_indep_set
The max indep set of matches.
Definition: edgeGrowth.h:100
This class is used to define an edge growth of a pattern in this DFSTree.
Definition: edgeGrowth.h:63
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
LabelData * l_v
The LabelData over the node of this edge growth.
Definition: edgeGrowth.h:80
std::ostream & operator<<(std::ostream &out, const DFSCode &code)
Print code in out.
Definition: DFSCode.cpp:40
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Inner class to handle data about labels in this interface graph.
An PRMInstance is a Bayesian Network fragment defined by a Class and used in a PRMSystem.
Definition: PRMInstance.h:63
NodeProperty< std::pair< PRMInstance< GUM_SCALAR > *, PRMInstance< GUM_SCALAR > *> > matches
The mapping between the u and v for each match in the interface graph.
Definition: edgeGrowth.h:90
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Definition: agrum.h:25
LabelData * edge
The LabelData over the edge of this edge growth.
Definition: edgeGrowth.h:78
std::vector< NodeId > * degree_list
Vector used for computation.
Definition: edgeGrowth.h:98
The class for generic Hash Tables.
Definition: hashTable.h:679
NodeId u
The id of the node from which we grow an edge.
Definition: edgeGrowth.h:76
A DFSTree is used by gspan to sort lexicographically patterns discovered in an interface graph...
Definition: DFSTree.h:71
NodeId v
If the growth is backward you must assigned the subscript of v, otherwise 0 is assigned (recall that ...
Definition: edgeGrowth.h:83
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
std::string toString()
Return a string representation of this.
Base class for undirected graphs.
Definition: undiGraph.h:109
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
UndiGraph iso_graph
The iso graph for computing the maximum independent set of matches.
Definition: edgeGrowth.h:96
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Size NodeId
Type for node ids.
Definition: graphElements.h:98
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
void insert(PRMInstance< GUM_SCALAR > *u, PRMInstance< GUM_SCALAR > *v)
Add the pair (u,v) as a match for the current growth.
EdgeGrowth(NodeId a_u, LabelData *an_edge, LabelData *a_l_v, NodeId a_v=0)
Constructor.