Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

TutteLayout.h
Go to the documentation of this file.
1 
43 #pragma once
44 
46 #include <ogdf/basic/geometry.h>
47 #include <ogdf/external/coin.h>
48 
49 #include <coin/CoinPackedMatrix.hpp>
50 
51 namespace ogdf {
52 
54 
58 {
59 public:
60 
61  TutteLayout();
63 
64  DRect bbox () const {
65  return m_bbox;
66  }
67 
68  void bbox (const DRect &bb) {
69  m_bbox = bb;
70  }
71 
72  virtual void call(GraphAttributes &AG) override;
73  void call(GraphAttributes &AG, const List<node> &givenNodes);
74 
75 private:
76 
77  static bool solveLP(
78  int cols,
79  const CoinPackedMatrix &Matrix,
80  const Array<double> &rightHandSide,
81  Array<double> &x);
82 
83  void setFixedNodes(const Graph &G, List<node> &nodes,
84  List<DPoint> &pos, double radius = 1.0);
91  void setFixedNodes(const Graph &G, List<node> &nodes, const List<node> &givenNodes,
92  List<DPoint> &pos, double radius = 1.0);
96  bool doCall(GraphAttributes &AG,
97  const List<node> &fixedNodes,
98  List<DPoint> &fixedPositions);
99 
101 };
102 
103 } // end namespace ogdf
Tutte&#39;s method for graph layout.
Definition: TutteLayout.h:57
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
Rectangles with real coordinates.
Definition: geometry.h:515
void bbox(const DRect &bb)
Definition: TutteLayout.h:68
Stores additional attributes of a graph (like layout information).
Doubly linked lists (maintaining the length of the list).
Definition: List.h:39
Declaration of interface for layout algorithms (class LayoutModule)
Interface of general layout algorithms.
Definition: LayoutModule.h:44
Handles connection to the COIN library, by offering helper classes.
The namespace for all OGDF objects.
Declaration of classes DPoint, DPolyline, DLine, DRect, DIntersectableRect, DScaler.
DRect bbox() const
Definition: TutteLayout.h:64