Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

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 
41 namespace ogdf {
42 class Skeleton;
43 class StaticPlanarSPQRTree;
44 
46 
53 public:
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 
66 private:
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 
78  void computePrincipalSplitComponentCost(StaticPlanarSPQRTree& T, NodeArray<int> cost[],
79  NodeArray<long long> embedding[], node parent, node mu);
80 };
81 
82 }
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
ogdf::EmbedderOptimalFlexDraw
The algorithm computes a planar embedding with minimum cost.
Definition: EmbedderOptimalFlexDraw.h:52
Graph.h
Includes declaration of graph class.
ogdf::EmbedderOptimalFlexDraw::setMinCostFlowComputer
void setMinCostFlowComputer(MinCostFlowModule< int > *pMinCostFlowComputer)
Sets the module option to compute min-cost flow.
Definition: EmbedderOptimalFlexDraw.h:59
ogdf::AdjElement
Class for adjacency list elements.
Definition: Graph_d.h:142
ogdf::MinCostFlowModule
Interface for min-cost flow algorithms.
Definition: MinCostFlowModule.h:50
ogdf::EmbedderOptimalFlexDraw::m_minCostFlowComputer
std::unique_ptr< MinCostFlowModule< int > > m_minCostFlowComputer
Definition: EmbedderOptimalFlexDraw.h:67
ogdf::internal::GraphRegisteredArray
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition: Graph_d.h:658
ogdf::Graph
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:869
ogdf::EmbedderOptimalFlexDraw::cost
void cost(EdgeArray< int > *cost)
Sets bend costs for each edge.
Definition: EmbedderOptimalFlexDraw.h:64
ogdf::StaticPlanarSPQRTree
SPQR-trees of planar graphs.
Definition: StaticPlanarSPQRTree.h:55
ogdf::EmbedderModule
Base class for embedder algorithms.
Definition: EmbedderModule.h:52
basic.h
Basic declarations, included by all source files.
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
EmbedderModule.h
Defines ogdf::EmbedderModule.
ogdf::Skeleton
Skeleton graphs of nodes in an SPQR-tree.
Definition: Skeleton.h:60
MinCostFlowModule.h
Definition of ogdf::MinCostFlowModule class template.
ogdf::EmbedderOptimalFlexDraw::m_cost
EdgeArray< int > * m_cost
Definition: EmbedderOptimalFlexDraw.h:69
ogdf::NodeElement
Class for the representation of nodes.
Definition: Graph_d.h:240
ogdf::internal::EdgeArrayBase2
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition: Graph_d.h:716