33#ifdef OGDF_INCLUDE_CGAL
45 using Node =
typename Graph::Node;
46 using Edge =
typename Graph::Edge;
47 std::vector<Node> m_nodes;
48 std::vector<Edge> m_edges;
51 inline const std::vector<Node>& nodes()
const {
return m_nodes; }
53 inline const std::vector<Edge>& edges()
const {
return m_edges; }
59 void push_back(
const Node& src,
const Edge& e) {
60 OGDF_ASSERT(m_nodes.empty() || e->isIncident(m_nodes.back()));
61 OGDF_ASSERT(m_nodes.empty() || m_nodes.back() == src);
63 if (!m_nodes.empty()) {
64 m_nodes.push_back(e->opposite(m_nodes.back()));
66 m_nodes.push_back(src);
67 m_nodes.push_back(e->opposite(src));
76 inline bool empty()
const {
return m_nodes.empty(); }
79 std::reverse(m_nodes.begin(), m_nodes.end());
80 std::reverse(m_edges.begin(), m_edges.end());
85 for (
unsigned int i = 0; i < m_edges.size(); ++i) {
86 std::cout << m_nodes[i] <<
", " << m_edges[i] <<
"->";
88 std::cout << m_nodes.back() << std::endl;
90 std::cout <<
"path is empty" << std::endl;
Reverse< T > reverse(T &container)
Provides iterators for container to make it easily iterable in reverse.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.
void print(std::ostream &os, const Array< E, INDEX > &a, char delim=' ')
Prints array a to output stream os using delimiter delim.