|
Open Graph Drawing Framework |
v. 2023.09 (Elderberry)
|
|
|
Go to the documentation of this file.
42 class GraphAttributes;
84 , m_ltolerance(0.0001)
85 , m_computeMaxIt(true)
87 , m_prevEnergy(startVal)
88 , m_prevLEnergy(startVal)
95 m_maxLocalIt = m_maxGlobalIt = maxVal;
165 void noise(
bool on) {
172 void doCall(GraphAttributes& GA,
const EdgeArray<double>& eLength,
bool simpleBFS);
176 if (m_prevEnergy == startVal)
178 m_prevEnergy = maxdelta;
183 double diff = m_prevEnergy - maxdelta;
184 if (diff < 0.0) diff = -diff;
186 std::cout <<
"Finished(): maxdelta: " << maxdelta <<
" diff/prev: " << diff / m_prevEnergy << std::endl;
190 bool done = (maxdelta < m_tolerance);
192 m_prevEnergy = maxdelta;
193 m_prevLEnergy = startVal;
200 if (m_prevLEnergy == startVal) {
201 m_prevLEnergy = deltav;
202 return deltav == 0.0;
206 std::cout <<
"Local delta: " << deltav <<
"\n";
209 double diff = m_prevLEnergy - deltav;
211 bool done = deltav == 0.0 || diff / m_prevLEnergy < m_ltolerance;
213 m_prevLEnergy = deltav;
274 const double threshold = std::numeric_limits<double>::max());
281 double pageRatio() {
return m_pageRatio; }
284 void pageRatio(
double x) { m_pageRatio = x; }
287 Scaling scaling()
const {
292 void scaling(Scaling sc) {
297 double scaleFunctionFactor()
const {
298 return m_scaleFactor;
302 void scaleFunctionFactor(
double f) {
307 void userBoundingBox(
double xmin,
double ymin,
double xmax,
double ymax) {
The namespace for all OGDF objects.
Stores additional attributes of a graph (like layout information).
Includes declaration of graph class.
double m_prevEnergy
Big K constant for strength computation.
void setUseLayout(bool b)
If set to true, the given layout is used for the initial positions.
bool finishedNode(double deltav)
Checks if inner loop (current node) is finished.
double m_desLength
Desirable edge length, used instead if > 0.
Tuples of two elements (2-tuples).
static const double desMinLength
Defines minimum desired edge length.
void setDesLength(double d)
Sets desirable edge length directly.
static const int maxVal
defines infinite upper bound for iteration number
static const double startVal
void setGlobalIterationFactor(int i)
bool m_useLayout
use positions or allow to shuffle nodes to avoid degeneration
Declaration of interface for layout algorithms (class LayoutModule)
int maxLocalIterations() const
It is possible to limit the number of iterations to a fixed value Returns the current setting of iter...
int m_gItFactor
factor for global iterations: m_gItBaseVal+m_gItFactor*|V|
int m_maxGlobalIt
Maximum number of global iterations.
SpringEmbedderKK()
Constructor: Constructs instance of Kamada Kawai Layout.
void setZeroLength(double d)
If set != 0, value zerolength is used to determine the desirable edge length by L = zerolength / max ...
bool m_computeMaxIt
If true, number of iterations is computed depending on number of nodes.
void setMaxGlobalIterations(int i)
Sets the number of global iterations to i.
int maxGlobalIterations() const
The spring-embedder layout algorithm by Kamada and Kawai.
int m_gItBaseVal
minimum number of global iterations
void setStopTolerance(double s)
Sets the value for the stop tolerance, below which the system is regarded stable (balanced) and the o...
RegisteredArray for nodes, edges and adjEntries of a graph.
Data type for general directed graphs (adjacency list representation).
bool finished(double maxdelta)
Checks if main loop is finished because local optimum reached.
static const double minVal
Basic declarations, included by all source files.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
double m_zeroLength
Length of a side of the display area, used for edge length computation if > 0.
void computeMaxIterations(bool b)
If set to true, number of iterations is computed depending on G.
int m_maxLocalIt
Maximum number of local iterations.
double m_ltolerance
value for local stop criterion
void setMaxLocalIterations(int i)
Sets the number of local iterations to i.
double m_prevLEnergy
local energy
double m_tolerance
The stop criterion when the forces of all strings are considered to be balanced.
Class for the representation of nodes.
Declaration and implementation of class Tuple2, Tuple3 and Tuple4.
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Interface of general layout algorithms.