Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
EmbedderOptimalFlexDraw.h
Go to the documentation of this file.
1
32#pragma once
33
34#include <ogdf/basic/Graph.h>
35#include <ogdf/basic/basic.h>
38
39#include <memory>
40
41namespace ogdf {
42class Skeleton;
43class StaticPlanarSPQRTree;
44
46
53public:
55
56 virtual void doCall(Graph& G, adjEntry& adjExternal) override;
57
59 void setMinCostFlowComputer(MinCostFlowModule<int>* pMinCostFlowComputer) {
60 m_minCostFlowComputer.reset(pMinCostFlowComputer);
61 }
62
64 void cost(EdgeArray<int>* cost) { m_cost = cost; }
65
66private:
67 std::unique_ptr<MinCostFlowModule<int>> m_minCostFlowComputer;
68
70
71 void createNetwork(node parent, node mu, int bends, NodeArray<int> cost[], Skeleton& skeleton,
72 EdgeArray<node>& edgeNode, Graph& N, EdgeArray<int>& upper, EdgeArray<int>& perUnitCost,
73 NodeArray<int>& supply);
74
75 void optimizeOverEmbeddings(StaticPlanarSPQRTree& T, node parent, node mu, int bends,
76 NodeArray<int> cost[], NodeArray<long long> embedding[]);
77
79 NodeArray<long long> embedding[], node parent, node mu);
80};
81
82}
Defines ogdf::EmbedderModule.
Includes declaration of graph class.
Definition of ogdf::MinCostFlowModule class template.
Basic declarations, included by all source files.
Class for adjacency list elements.
Definition Graph_d.h:143
Base class for embedder algorithms.
The algorithm computes a planar embedding with minimum cost.
void createNetwork(node parent, node mu, int bends, NodeArray< int > cost[], Skeleton &skeleton, EdgeArray< node > &edgeNode, Graph &N, EdgeArray< int > &upper, EdgeArray< int > &perUnitCost, NodeArray< int > &supply)
void setMinCostFlowComputer(MinCostFlowModule< int > *pMinCostFlowComputer)
Sets the module option to compute min-cost flow.
void cost(EdgeArray< int > *cost)
Sets bend costs for each edge.
virtual void doCall(Graph &G, adjEntry &adjExternal) override
Calls the embedder algorithm for graph G.
std::unique_ptr< MinCostFlowModule< int > > m_minCostFlowComputer
void optimizeOverEmbeddings(StaticPlanarSPQRTree &T, node parent, node mu, int bends, NodeArray< int > cost[], NodeArray< long long > embedding[])
void computePrincipalSplitComponentCost(StaticPlanarSPQRTree &T, NodeArray< int > cost[], NodeArray< long long > embedding[], node parent, node mu)
Data type for general directed graphs (adjacency list representation).
Definition Graph_d.h:866
Interface for min-cost flow algorithms.
Class for the representation of nodes.
Definition Graph_d.h:241
Skeleton graphs of nodes in an SPQR-tree.
Definition Skeleton.h:60
SPQR-trees of planar graphs.
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition Graph_d.h:717
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition Graph_d.h:659
#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.