33 #ifdef OGDF_INCLUDE_CGAL
44 using Graph = OGDFGraphWrapper;
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; }
55 inline bool is_reversed(
unsigned int edge_i)
const {
56 return m_edges[edge_i]->source() != m_nodes[edge_i];
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(); }
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;