aGrUM  0.16.0
edgeCode.h
Go to the documentation of this file.
1 
29 #ifndef GUM_EDGE_CODE_H
30 #define GUM_EDGE_CODE_H
31 
32 #include <ostream>
33 
34 #include <agrum/agrum.h>
36 
37 namespace gum {
38 
39  namespace prm {
40 
41  namespace gspan {
42 
52  struct EdgeCode {
66 
71  EdgeCode(const EdgeCode& source);
72 
74  ~EdgeCode();
75 
78 
81 
84 
87 
90 
92  std::string name;
93 
98  bool isForward() const;
99 
104  bool isBackward() const;
105 
111  EdgeCode& operator=(const EdgeCode& source);
112 
118  bool operator==(const EdgeCode& code) const;
119 
125  bool operator!=(const EdgeCode& code) const;
126 
132  bool operator<(const EdgeCode& code) const;
133  };
134 
141  std::ostream& operator<<(std::ostream& out, const EdgeCode& code);
142 
143  } /* namespace gspan */
144  } /* namespace prm */
145 } /* namespace gum */
146 
147 #ifndef GUM_NO_INLINE
149 #endif // GUM_NO_INLINE
150 
151 #endif /* GUM_EDGE_CODE_H */
NodeId i
The DFS subscript of the first node in the code.
Definition: edgeCode.h:77
bool operator!=(const EdgeCode &code) const
Difference operator.
Definition: edgeCode_inl.h:78
std::ostream & operator<<(std::ostream &out, const DFSCode &code)
Print code in out.
Definition: DFSCode.cpp:40
NodeId j
The DFS subscript of the second node in the code.
Definition: edgeCode.h:80
Size l_ij
The label of the edge in the code.
Definition: edgeCode.h:86
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Definition: agrum.h:25
represent a DFS code used by gspan.
Definition: edgeCode.h:52
bool isBackward() const
Returns true if this EdgeCode is a backward edge.
Definition: edgeCode_inl.h:59
bool operator<(const EdgeCode &code) const
Lesser than operator.
Definition: edgeCode_inl.h:84
bool operator==(const EdgeCode &code) const
Equality operator.
Definition: edgeCode_inl.h:72
std::string name
The string version of this EdgeCode.
Definition: edgeCode.h:92
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
EdgeCode(NodeId i, NodeId j, Size l_i, Size l_ij, Size l_j)
Default constructor.
Definition: edgeCode_inl.h:35
Size l_j
The label of the second node in the code.
Definition: edgeCode.h:89
bool isForward() const
Returns true if this EdgeCode is a forward edge.
Definition: edgeCode_inl.h:56
EdgeCode & operator=(const EdgeCode &source)
Copy operator.
Definition: edgeCode_inl.h:62
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Definition: types.h:48
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.
Size l_i
The label of the first node in the code.
Definition: edgeCode.h:83