39 namespace spring_embedder {
41 template<
typename SpringEmbedderTYPE,
typename NodeInfo,
typename ForceModelBase>
75 , m_boundingBox(boundingBox)
79 , m_adjLists(2*gc.numberOfEdges())
80 , m_forceModel(nullptr)
81 , m_forceModelImprove(nullptr)
83 , m_avgDisplacement(numeric_limits<double>::max())
84 , m_maxDisplacement(numeric_limits<double>::max())
102 m_t = m_tNull = 0.25 * m_idealEdgeLength * sqrt(
numberOfNodes());
104 m_coolingFactor = m_spring.coolDownFactor();
107 m_avgDisplacement = numeric_limits<double>::max();
108 m_maxDisplacement = numeric_limits<double>::max();
116 m_coolingFactor = m_spring.coolDownFactor();
119 m_avgDisplacement = numeric_limits<double>::max();
120 m_maxDisplacement = numeric_limits<double>::max();
125 m_cF += m_spring.forceLimitStep();
126 m_t = m_tNull / std::log2(m_cF);
128 m_coolingFactor *= m_spring.coolDownFactor();
135 bool noise()
const {
return m_spring.noise(); }
156 return m_avgDisplacement <= m_spring.avgConvergenceFactor() * m_idealEdgeLength
int numberOfIterationsImprove() const
Declaration of class GraphAttributes which extends a Graph by additional attributes.
bool hasConverged() const
const NodeArray< int > & index() const
Array< NodeInfo > & vInfo()
double idealEdgeLength() const
Array< int > & adjLists()
ForceModelBase * m_forceModel
double coolingFactor() const
void initImprovementPhase()
double scaleFactor() const
Representation of a barrier.
const ForceModelBase & forceModelImprove() const
void threadSync()
Synchronizes the threads in the group.
ForceModelBase * m_forceModelImprove
int numberOfIterations() const
double avgDisplacement() const
Implementation of a thread barrier.
INDEX size() const
Returns the size (number of elements) of the array.
Stores additional attributes of a graph (like layout information).
double maxDisplacement() const
GraphAttributes & getAttributes()
Declaration of graph copy classes.
const GraphCopy & getGraph() const
Copies of graphs supporting edge splitting.
MasterBase(const SpringEmbedderTYPE &spring, const GraphCopy &gc, GraphAttributes &ga, DPoint &boundingBox)
int numberOfNodes() const
const SpringEmbedderTYPE & m_spring
const ForceModelBase & forceModel() const
The namespace for all OGDF objects.
Array< NodeInfo > m_vInfo
double maxForceLength() const