Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
GraphUtils.h
Go to the documentation of this file.
1
31#pragma once
32
33#include <ogdf/basic/Graph.h>
34#include <ogdf/basic/basic.h>
35
36#include <functional>
37
38namespace ogdf {
39template<class E>
40class List;
41} // namespace ogdf
42
43namespace ogdf {
44
46OGDF_EXPORT void moveEnd(Graph& G, edge e, node keep_end, node new_end);
47
49OGDF_EXPORT void moveEnd(Graph& G, adjEntry keep_adj, adjEntry new_adj,
51
53OGDF_EXPORT edge splitEdge(Graph& G, edge old_edge, node new_adj_to_source, node new_adj_to_target,
54 edge new_edge = nullptr);
55
57OGDF_EXPORT adjEntry splitEdge(Graph& G, adjEntry adj, node new_adj_to_node, node new_adj_to_twin,
58 edge new_edge = nullptr);
59
61OGDF_EXPORT bool joinEdge(Graph& G, edge u_e, edge v_e, node u, node v);
62
64OGDF_EXPORT bool joinEdge(Graph& G, adjEntry u_adj, adjEntry v_adj, node u, node v);
65
67OGDF_EXPORT bool joinEdge(Graph& G, edge u_e, edge v_e, node u, node v,
68 const std::function<void(edge)>& deleteEdge);
69
71OGDF_EXPORT bool joinEdge(Graph& G, adjEntry u_adj, adjEntry v_adj, node u, node v,
72 const std::function<void(edge)>& deleteEdge);
73
76
79
81
84
87
90
91}
Includes declaration of graph class.
Basic declarations, included by all source files.
Class for adjacency list elements.
Definition Graph_d.h:143
Class for the representation of edges.
Definition Graph_d.h:364
Data type for general directed graphs (adjacency list representation).
Definition Graph_d.h:866
Doubly linked lists (maintaining the length of the list).
Definition List.h:1451
Class for the representation of nodes.
Definition Graph_d.h:241
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
Definition config.h:117
The namespace for all OGDF objects.
void assertStarCentreAndRay(node centre, node ray)
Check that one vertex is the centre of star while the other is one of its rays.
OrderComp
Definition GraphUtils.h:80
void moveEnd(Graph &G, edge e, node keep_end, node new_end)
Change one endpoint of an edge, no matter its direction.
void moveAdjToFront(Graph &G, adjEntry f)
Rotate a node to move a given adjEntry to the front of its list.
node getCentreOfStar(node g_n)
Given a vertex that is either the centre or ray of a star, return the centre of the respective star.
bool joinEdge(Graph &G, edge u_e, edge v_e, node u, node v)
Join two edges into one, keeping the two given endpoints.
Direction
Definition basic.h:150
edge splitEdge(Graph &G, edge old_edge, node new_adj_to_source, node new_adj_to_target, edge new_edge=nullptr)
Split an edge, moving the two new middle endpoints to some other vertices.
void moveAdjToBack(Graph &G, adjEntry b)
Rotate a node to move a given adjEntry to the back of its list.
OrderComp compareCyclicOrder(node n, List< adjEntry > &o, bool full_check=false)
Cyclically compare the rotation of a node with a given cyclic order.