Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

OptimalRanking.h
Go to the documentation of this file.
1 
33 #pragma once
34 
37 #include <memory>
38 #include <ogdf/basic/NodeArray.h>
39 
40 
41 namespace ogdf {
42 
44 
76 
77  std::unique_ptr<AcyclicSubgraphModule> m_subgraph; // option for acyclic sugraph
79 
80 public:
83 
84 
90  virtual void call(const Graph &G, NodeArray<int> &rank) override;
92 
94 
99  void call(const Graph &G, const EdgeArray<int> &length, NodeArray<int> &rank);
100 
102 
108  virtual void call(
109  const Graph &G,
110  const EdgeArray<int> &length,
111  const EdgeArray<int> &cost,
112  NodeArray<int> &rank) override;
113 
114 
120 
126  bool separateMultiEdges() const { return m_separateMultiEdges; }
127 
129  void separateMultiEdges(bool b) { m_separateMultiEdges = b; }
130 
131 
137  void setSubgraph(AcyclicSubgraphModule *pSubgraph) {
139  m_subgraph.reset(pSubgraph);
140  }
141 
143 
144 private:
146  void doCall(const Graph& G,
147  NodeArray<int> &rank,
148  EdgeArray<bool> &reversed,
149  const EdgeArray<int> &length,
150  const EdgeArray<int> &cost);
151 };
152 
153 
154 } // end namespace ogdf
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:472
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
bool separateMultiEdges() const
Returns the current setting of option separateMultiEdges.
Declaration of interface for ranking algorithms.
The optimal ranking algorithm.
Declaration and implementation of NodeArray class.
Base class of algorithms for computing a maximal acyclic subgraph.
void separateMultiEdges(bool b)
Sets the option separateMultiEdges to b.
The namespace for all OGDF objects.
std::unique_ptr< AcyclicSubgraphModule > m_subgraph
Declaration of interface for acyclic subgraph algorithms.
Interface of algorithms for computing a node ranking.
Definition: RankingModule.h:45