32 #include <agrum/PRM/gspan/edgeCode.h> 34 #ifndef GUM_DFS_CODE_H 35 # define GUM_DFS_CODE_H 64 static bool validNeighbors(EdgeCode* e1, EdgeCode* e2);
77 DFSCode(
const DFSCode& source);
89 std::vector< EdgeCode* > codes;
96 DFSCode& operator=(
const DFSCode& source);
103 bool operator==(
const DFSCode& code)
const;
110 bool operator!=(
const DFSCode& code)
const;
117 bool operator<(
const DFSCode& code)
const;
124 bool operator<=(
const DFSCode& code)
const;
127 typedef std::vector< EdgeCode* >::iterator iterator;
130 typedef std::vector< EdgeCode* >::const_iterator const_iterator;
139 std::ostream& operator<<(std::ostream& out,
const DFSCode& code);
141 inline bool DFSCode::validNeighbors(EdgeCode* e1, EdgeCode* e2) {
142 if (e1->isBackward()) {
143 if (e2->isForward()) {
144 return (e2->i <= e1->i) && (e2->j = (e1->i + 1));
146 return (e2->i == e1->i) && (e1->j < e2->j);
150 if (e2->isForward()) {
151 return (e2->i <= e1->j) && (e2->j == (e1->j + 1));
153 return (e2->i == e1->j) && (e2->j < e1->i);
162 # ifndef GUM_NO_INLINE 163 # include <agrum/PRM/gspan/DFSCode_inl.h>