|
Open Graph Drawing Framework |
v. 2023.09 (Elderberry)
|
|
|
Go to the documentation of this file.
83 return tmp ? tmp->
opposite(v) :
nullptr;
104 sssp.
call(G, weights, seeds, m_predecessor, m_distance);
108 for (
node seed : seeds) {
109 processed[seed] =
true;
110 m_seedOfNode[seed] = seed;
111 m_nodeList[seed].push(seed);
114 for (
node u : G.nodes) {
117 for (v = u; !processed[v]; v = predecessor(v)) {
122 for (
node passedNode : foundNodes) {
123 m_seedOfNode[passedNode] = m_seedOfNode[v];
124 m_nodeList[m_seedOfNode[v]].push(passedNode);
An array that keeps track of the number of inserted elements; also usable as an efficient stack.
The namespace for all OGDF objects.
Declaration and implementation of ArrayBuffer class.
NodeArray< node > m_seedOfNode
Includes declaration of graph class.
const Graph & getGraph() const
Returns a reference to the graph the Voronoi region has been computed for.
Computes Voronoi regions in an edge-weighted graph.
std::map< node, ArrayBuffer< node > > m_nodeList
edge predecessorEdge(node v) const
Returns the edge incident to v and its predecessor. Note that the predecessor of a terminal is nullpt...
const ArrayBuffer< node > & nodesInRegion(node v) const
Returns the list of nodes in the Voronoi region of node v.
Dijkstra's single source shortest path algorithm.
const List< node > & getSeeds() const
Returns a reference to the list of seeds the Voronoi region has been computed for.
Decralation of GraphElement and GraphList classes.
void call(const Graph &G, const EdgeArray< T > &weight, const List< node > &sources, NodeArray< edge > &predecessor, NodeArray< T > &distance, bool directed=false, bool arcsReversed=false, node target=nullptr, T maxLength=std::numeric_limits< T >::max())
Calculates, based on the graph G with corresponding edge costs and source nodes, the shortest paths a...
void push(E e)
Puts a new element in the buffer.
Doubly linked lists (maintaining the length of the list).
RegisteredArray for nodes, edges and adjEntries of a graph.
Data type for general directed graphs (adjacency list representation).
void computeVoronoiRegions(const Graph &G, const EdgeArray< T > &weights, const List< node > &seeds)
T distance(node v) const
Returns the distance between v and its Voronoi seed.
Voronoi(const Graph &G, const EdgeArray< T > &weights, const List< node > &seeds)
Build data structure to query Voronoi regions of edge-weighted graph G with given Voronoi seeds.
node opposite(node v) const
Returns the adjacent node different from v.
Class for the representation of edges.
Implementation of Dijkstra's single source shortest path algorithm.
Declaration of doubly linked lists and iterators.
NodeArray< edge > m_predecessor
const List< node > & m_seeds
node predecessor(node v) const
Returns the nearest node to v on the shortest path to its Voronoi seed.
Class for the representation of nodes.
node seed(node v) const
Returns the Voronoi seed of node v.
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
NodeArray< T > m_distance