44namespace spring_embedder {
47template<
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();
Declaration and implementation of Array class and Array algorithms.
Includes declaration of graph class.
Declaration of class GraphAttributes which extends a Graph by additional attributes.
Declaration of graph copy classes.
Declaration of classes GenericPoint, GenericPolyline, GenericLine, GenericSegment,...
The parameterized class Array implements dynamic arrays of type E.
double norm() const
Returns the norm of the point.
Stores additional attributes of a graph (like layout information).
double height(node v) const
Returns the height of the bounding box of node v.
double width(node v) const
Returns the width of the bounding box of node v.
const Graph & original() const
Returns a reference to the original graph.
Copies of graphs supporting edge splitting.
Class for the representation of nodes.
Base class for ogdf::SpringEmbedderGridVariant::Worker.
void finalScaling(Array< NodeInfo > &vInfo, const Array< int > &adjLists)
void scaling(Array< NodeInfo > &vInfo, const Array< int > &adjLists)
double sumUpLengths(Array< NodeInfo > &vInfo, const Array< int > &adjLists)
WorkerBase(unsigned int id, Master &master, int vStartIndex, int vStopIndex, node vStart, node vStop)
virtual void operator()()=0
virtual ~WorkerBase()=default
void updateMin(T &min, const T &newValue)
Stores the minimum of min and newValue in min.
void updateMax(T &max, const T &newValue)
Stores the maximum of max and newValue in max.
The namespace for all OGDF objects.