Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

TutteLayout.h
Go to the documentation of this file.
1 
32 #pragma once
33 
35 #include <ogdf/basic/geometry.h>
36 
37 #include <ogdf/external/coin.h>
38 #include <coin/CoinPackedMatrix.hpp>
39 
40 namespace ogdf {
41 
43 
57 public:
58  TutteLayout();
59 
60  DRect bbox() const { return m_bbox; }
61 
62  void bbox(const DRect& bb) { m_bbox = bb; }
63 
64  virtual void call(GraphAttributes& AG) override;
65  void call(GraphAttributes& AG, const List<node>& givenNodes);
66 
67 private:
68  static bool solveLP(int cols, const CoinPackedMatrix& Matrix,
69  const Array<double>& rightHandSide, Array<double>& x);
70 
71  void setFixedNodes(const Graph& G, List<node>& nodes, List<DPoint>& pos, double radius = 1.0);
72 
78  void setFixedNodes(const Graph& G, List<node>& nodes, const List<node>& givenNodes,
79  List<DPoint>& pos, double radius = 1.0);
80 
81  bool doCall(GraphAttributes& AG, const List<node>& fixedNodes, List<DPoint>& fixedPositions);
82 
84 };
85 
86 }
ogdf
The namespace for all OGDF objects.
Definition: AugmentationModule.h:36
ogdf::GraphAttributes
Stores additional attributes of a graph (like layout information).
Definition: GraphAttributes.h:66
ogdf::TutteLayout
Tutte's layout algorithm.
Definition: TutteLayout.h:56
geometry.h
Declaration of classes GenericPoint, GenericPolyline, GenericLine, GenericSegment,...
LayoutModule.h
Declaration of interface for layout algorithms (class LayoutModule)
ogdf::TutteLayout::m_bbox
DRect m_bbox
Definition: TutteLayout.h:83
coin.h
Definition of ogdf::CoinManager.
ogdf::Array< double >
ogdf::DRect
Rectangles with real coordinates.
Definition: geometry.h:791
ogdf::List
Doubly linked lists (maintaining the length of the list).
Definition: List.h:42
ogdf::Graph
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:862
ogdf::TutteLayout::bbox
DRect bbox() const
Definition: TutteLayout.h:60
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
ogdf::TutteLayout::bbox
void bbox(const DRect &bb)
Definition: TutteLayout.h:62
ogdf::LayoutModule
Interface of general layout algorithms.
Definition: LayoutModule.h:44