aGrUM  0.17.2
a C++ library for (probabilistic) graphical models
DFSCode.cpp
Go to the documentation of this file.
1 
31 
32 #ifdef GUM_NO_INLINE
34 #endif // GUM_NO_INLINE
35 
36 namespace gum {
37  namespace prm {
38  namespace gspan {
39 
40  std::ostream& operator<<(std::ostream& out, const DFSCode& code) {
41  out << "[ ";
42  bool first = true;
43 
44  for (const auto item: code.codes) {
45  if (!first) out << ", ";
46  out << *item;
47  first = false;
48  }
49 
50  out << " ]";
51  return out;
52  }
53 
54  } /* namespace gspan */
55  } /* namespace prm */
56 } /* namespace gum */
Copyright 2005-2020 Pierre-Henri WUILLEMIN () et Christophe GONZALES () info_at_agrum_dot_org.
std::ostream & operator<<(std::ostream &out, const DFSCode &code)
Print code in out.
Definition: DFSCode.cpp:40
Reprensent a Depth First Search coding of a graph.
Definition: DFSCode.h:53
Copyright 2005-2020 Pierre-Henri WUILLEMIN () et Christophe GONZALES () info_at_agrum_dot_org.
Definition: agrum.h:25
std::vector< EdgeCode *> codes
The vector containing the EdgeCode composing this DFSCode.
Definition: DFSCode.h:90
Copyright 2005-2020 Pierre-Henri WUILLEMIN () et Christophe GONZALES () info_at_agrum_dot_org.