63 for (
const auto item: code.
codes) {
64 if (!first) out <<
", ";
75 for (
size_t idx = 0; idx <
codes.size(); ++idx) {
76 if ((*
codes[idx]) != (*
codes[idx])) {
return false; }
87 for (
size_t idx = 0; idx <
codes.size(); ++idx) {
88 if ((*
codes[idx]) != (*
codes[idx])) {
return true; }
101 for (; (iter !=
codes.end()) && (jter != from.
codes.end()); ++iter, ++jter) {
102 if ((**iter) != (**jter)) {
109 }
else if (alpha.
j < beta.
j) {
112 }
else if ((alpha.
j == beta.
j) && (alpha.
l_ij < beta.
l_ij)) {
121 }
else if (beta.
i < alpha.
i) {
124 }
else if (beta.
i == alpha.
i) {
125 if (alpha.
l_i < beta.
l_i) {
127 }
else if (alpha.
l_i == beta.
l_i) {
130 }
else if (alpha.
l_ij == beta.
l_ij) {
131 return alpha.
l_j < beta.
l_j;
139 return (**iter) < (**jter);
Inline implementation of the DFSCode class.
Reprensent a Depth First Search coding of a graph.
std::vector< EdgeCode * > codes
The vector containing the EdgeCode composing this DFSCode.
bool operator==(const DFSCode &code) const
Equality operator.
std::vector< EdgeCode * >::const_iterator const_iterator
Code alias.
bool operator!=(const DFSCode &code) const
Difference operator.
DFSCode()
Default constructor.
bool operator<(const DFSCode &code) const
Lesser than operator.
std::ostream & operator<<(std::ostream &out, const DFSCode &code)
Print code in out.
namespace for all probabilistic relational models entities
gum is the global namespace for all aGrUM entities
represent a DFS code used by gspan.
Size l_i
The label of the first node in the code.
NodeId i
The DFS subscript of the first node in the code.
Size l_ij
The label of the edge in the code.
bool isForward() const
Returns true if this EdgeCode is a forward edge.
NodeId j
The DFS subscript of the second node in the code.
bool isBackward() const
Returns true if this EdgeCode is a backward edge.
Size l_j
The label of the second node in the code.