The spring-embedder layout algorithm with force approximation using hte grid variant approach. More...
#include <ogdf/energybased/SpringEmbedderGridVariant.h>
Classes | |
class | ForceModelBase |
class | ForceModelEades |
class | ForceModelFR |
class | ForceModelFRModAttr |
class | ForceModelFRModRep |
class | ForceModelGronemann |
class | ForceModelHachul |
struct | NodeInfo |
Public Member Functions | |
SpringEmbedderGridVariant () | |
Public Member Functions inherited from ogdf::spring_embedder::SpringEmbedderBase | |
SpringEmbedderBase () | |
Constructor. More... | |
double | avgConvergenceFactor () const |
Returns the currently used average convergence factor. More... | |
void | avgConvergenceFactor (double f) |
Sets the average convergence factor to f . More... | |
virtual void | call (GraphAttributes &GA) override |
Computes a layout of graph GA . More... | |
double | coolDownFactor () const |
double | forceLimitStep () const |
SpringForceModel | forceModel () const |
Returns the currently used force model. More... | |
void | forceModel (SpringForceModel fm) |
Sets the used force model to fm . More... | |
SpringForceModel | forceModelImprove () const |
Returns the currently used force model for the improvement step. More... | |
void | forceModelImprove (SpringForceModel fm) |
Sets the used force model for the improvement step to fm . More... | |
double | idealEdgeLength () const |
Returns the current setting of ideal edge length. More... | |
void | idealEdgeLength (double len) |
Sets the ideal edge length to len . More... | |
int | iterations () const |
Returns the current setting of iterations. More... | |
void | iterations (int i) |
Sets the number of iterations to i . More... | |
int | iterationsImprove () const |
Returns the current setting of iterations for the improvement phase. More... | |
void | iterationsImprove (int i) |
Sets the number of iterations for the improvement phase to i . More... | |
double | maxConvergenceFactor () const |
Returns the currently used maximum convergence factor. More... | |
void | maxConvergenceFactor (double f) |
Sets the maximum convergence factor to f . More... | |
unsigned int | maxThreads () const |
Returns the maximal number of used threads. More... | |
void | maxThreads (unsigned int n) |
Sets the maximal number of used threads to n . More... | |
double | minDistCC () const |
Returns the minimum distance between connected components. More... | |
void | minDistCC (double x) |
Sets the minimum distance between connected components to x . More... | |
bool | noise () const |
Returns the current setting of noise. More... | |
void | noise (bool on) |
Sets the parameter noise to on . More... | |
double | pageRatio () |
Returns the page ratio. More... | |
void | pageRatio (double x) |
Sets the page ration to x . More... | |
double | scaleFunctionFactor () const |
Returns the current scale function factor. More... | |
void | scaleFunctionFactor (double f) |
Sets the scale function factor to f . More... | |
Scaling | scaling () const |
Returns the current scaling method. More... | |
void | scaling (Scaling sc) |
Sets the method for scaling the inital layout to sc . More... | |
DRect | userBoundingBox () const |
Gets the user bounding box. More... | |
void | userBoundingBox (double xmin, double ymin, double xmax, double ymax) |
Sets the user bounding box (used if scaling method is scUserBoundingBox). More... | |
Public Member Functions inherited from ogdf::LayoutModule | |
LayoutModule () | |
Initializes a layout module. More... | |
virtual | ~LayoutModule () |
void | operator() (GraphAttributes &GA) |
Computes a layout of graph GA . More... | |
Protected Member Functions | |
void | callMaster (const GraphCopy ©, GraphAttributes &attr, DPoint &box) override |
Additional Inherited Members | |
Public Types inherited from ogdf::spring_embedder::SpringEmbedderBase | |
enum | Scaling { Scaling::input, Scaling::userBoundingBox, Scaling::scaleFunction, Scaling::useIdealEdgeLength } |
The scaling method used by the algorithm. More... | |
Protected Attributes inherited from ogdf::spring_embedder::SpringEmbedderBase | |
double | m_avgConvergenceFactor |
convergence if avg. More... | |
DRect | m_boundingBox |
double | m_coolDownFactor |
double | m_forceLimitStep |
SpringForceModel | m_forceModel |
SpringForceModel | m_forceModelImprove |
The used force model. More... | |
double | m_idealEdgeLength |
The ideal edge length. More... | |
int | m_iterations |
The number of iterations. More... | |
int | m_iterationsImprove |
The number of iterations for the improvement phase. More... | |
double | m_maxConvergenceFactor |
convergence if max. More... | |
unsigned int | m_maxThreads |
The maximal number of used threads. More... | |
double | m_minDistCC |
The minimal distance between connected components. More... | |
bool | m_noise |
The used force model for the improvement phase. More... | |
double | m_pageRatio |
The page ratio. More... | |
double | m_scaleFactor |
The factor used if scaling type is scScaleFunction. More... | |
Scaling | m_scaling |
The scaling method. More... | |
DRect | m_userBoundingBox |
The spring-embedder layout algorithm with force approximation using hte grid variant approach.
The implementation used in SpringEmbedderGridVariant is based on the following publication:
Thomas M. J. Fruchterman, Edward M. Reingold: Graph Drawing by Force-directed Placement. Software - Practice and Experience 21(11), pp. 1129-1164, 1991.
Fruchterman/Reingold layout provides the following optional parameters.
Option | Type | Default | Description |
---|---|---|---|
iterations | int | 400 | The number of iterations performed in the optimization. |
noise | bool | true | If set to true, (small) random perturbations are performed. |
minDistCC | double | 20.0 | The minimum distance between connected components. |
pageRatio | double | 1.0 | The page ratio. |
scaling | Scaling | Scaling::scaleFunction | The scaling method for scaling the inital layout. |
scaleFunctionFactor | double | 8.0 | The scale function factor (used if scaling = scaleFunction). |
userBoundingBox | rectangle | (0.0,100.0,0.0,100.0) | The user bounding box for scaling (used if scaling = scUserBoundingBox). |
Definition at line 81 of file SpringEmbedderGridVariant.h.
|
inline |
Definition at line 83 of file SpringEmbedderGridVariant.h.
|
overrideprotectedvirtual |
Implements ogdf::spring_embedder::SpringEmbedderBase.