|
Open Graph Drawing Framework |
v. 2023.09 (Elderberry)
|
|
|
Go to the documentation of this file.
44 namespace spring_embedder {
47 template<
class Master,
class NodeInfo>
50 WorkerBase(
unsigned int id, Master& master,
int vStartIndex,
int vStopIndex,
node vStart,
99 double xmin = std::numeric_limits<double>::max(),
100 xmax = std::numeric_limits<double>::lowest();
101 double ymin = std::numeric_limits<double>::max(),
102 ymax = std::numeric_limits<double>::lowest();
107 NodeInfo& vj = vInfo[j];
109 double xv = s * vj.m_pos.m_x;
110 double yv = s * vj.m_pos.m_y;
114 double wv = ga.
width(vOrig);
115 double hv = ga.
height(vOrig);
155 double sumLengths = 0.0;
157 const NodeInfo& vj = vInfo[j];
158 for (
int k = vj.m_adjBegin; k != vj.m_adjStop; ++k) {
161 DPoint dist = vj.m_pos - vInfo[u].m_pos;
162 sumLengths += dist.
norm();
The namespace for all OGDF objects.
Stores additional attributes of a graph (like layout information).
Declaration of class GraphAttributes which extends a Graph by additional attributes.
Includes declaration of graph class.
virtual ~WorkerBase()=default
Declaration of classes GenericPoint, GenericPolyline, GenericLine, GenericSegment,...
Copies of graphs supporting edge splitting.
virtual void operator()()=0
double sumUpLengths(Array< NodeInfo > &vInfo, const Array< int > &adjLists)
WorkerBase(unsigned int id, Master &master, int vStartIndex, int vStopIndex, node vStart, node vStop)
double norm() const
Returns the norm of the point.
void updateMin(T &min, const T &newValue)
Stores the minimum of min and newValue in min.
Declaration of graph copy classes.
void scaling(Array< NodeInfo > &vInfo, const Array< int > &adjLists)
double height(node v) const
Returns the height of the bounding box of node v.
void finalScaling(Array< NodeInfo > &vInfo, const Array< int > &adjLists)
void updateMax(T &max, const T &newValue)
Stores the maximum of max and newValue in max.
Declaration and implementation of Array class and Array algorithms.
Class for the representation of nodes.
Base class for ogdf::SpringEmbedderGridVariant::Worker.
const Graph & original() const
Returns a reference to the original graph.
double width(node v) const
Returns the width of the bounding box of node v.