Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

EmbedderOptimalFlexDraw.h
Go to the documentation of this file.
1 
32 #pragma once
33 
35 #include <memory>
38 
39 namespace ogdf {
40 
42 
49 {
50 public:
51 
53 
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) {
65  m_cost = cost;
66  }
67 
68 private:
69 
70  std::unique_ptr<MinCostFlowModule<int>> m_minCostFlowComputer;
71 
73 
74  void createNetwork(
75  node parent,
76  node mu,
77  int bends,
78  NodeArray<int> cost[],
79  Skeleton &skeleton,
80  EdgeArray<node> &edgeNode,
81  Graph &N,
82  EdgeArray<int> &upper,
83  EdgeArray<int> &perUnitCost,
84  NodeArray<int> &supply);
85 
86  void optimizeOverEmbeddings(
88  node parent,
89  node mu,
90  int bends,
91  NodeArray<int> cost[],
92  NodeArray<long long> embedding[]);
93 
94  void computePrincipalSplitComponentCost(
96  NodeArray<int> cost[],
97  NodeArray<long long> embedding[],
98  node parent,
99  node mu);
100 };
101 
102 } // end namespace ogdf
The algorithm computes a planar embedding with minimum cost.
void cost(EdgeArray< int > *cost)
Sets bend costs for each edge.
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:472
void setMinCostFlowComputer(MinCostFlowModule< int > *pMinCostFlowComputer)
Sets the module option to compute min-cost flow.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
std::unique_ptr< MinCostFlowModule< int > > m_minCostFlowComputer
Interface for min-cost flow algorithms.
Declaration of interface for embedder for graphs.
Skeleton graphs of nodes in an SPQR-tree.
Definition: Skeleton.h:61
Declaration of class StaticPlanarSPQRTree.
Template of base class of min-cost-flow algorithms.
Class for the representation of nodes.
Definition: Graph_d.h:167
The namespace for all OGDF objects.
Base class for embedder algorithms.
SPQR-trees of planar graphs.
Class for adjacency list elements.
Definition: Graph_d.h:78