Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
ogdf::SpringEmbedderGridVariant Class Reference

The spring-embedder layout algorithm with force approximation using hte grid variant approach. More...

#include <ogdf/energybased/SpringEmbedderGridVariant.h>

+ Inheritance diagram for ogdf::SpringEmbedderGridVariant:

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.
 
double avgConvergenceFactor () const
 Returns the currently used average convergence factor.
 
void avgConvergenceFactor (double f)
 Sets the average convergence factor to f.
 
virtual void call (GraphAttributes &GA) override
 Computes a layout of graph GA.
 
double coolDownFactor () const
 
double forceLimitStep () const
 
SpringForceModel forceModel () const
 Returns the currently used force model.
 
void forceModel (SpringForceModel fm)
 Sets the used force model to fm.
 
SpringForceModel forceModelImprove () const
 Returns the currently used force model for the improvement step.
 
void forceModelImprove (SpringForceModel fm)
 Sets the used force model for the improvement step to fm.
 
double idealEdgeLength () const
 Returns the current setting of ideal edge length.
 
void idealEdgeLength (double len)
 Sets the ideal edge length to len.
 
int iterations () const
 Returns the current setting of iterations.
 
void iterations (int i)
 Sets the number of iterations to i.
 
int iterationsImprove () const
 Returns the current setting of iterations for the improvement phase.
 
void iterationsImprove (int i)
 Sets the number of iterations for the improvement phase to i.
 
double maxConvergenceFactor () const
 Returns the currently used maximum convergence factor.
 
void maxConvergenceFactor (double f)
 Sets the maximum convergence factor to f.
 
unsigned int maxThreads () const
 Returns the maximal number of used threads.
 
void maxThreads (unsigned int n)
 Sets the maximal number of used threads to n.
 
double minDistCC () const
 Returns the minimum distance between connected components.
 
void minDistCC (double x)
 Sets the minimum distance between connected components to x.
 
bool noise () const
 Returns the current setting of noise.
 
void noise (bool on)
 Sets the parameter noise to on.
 
double pageRatio ()
 Returns the page ratio.
 
void pageRatio (double x)
 Sets the page ration to x.
 
double scaleFunctionFactor () const
 Returns the current scale function factor.
 
void scaleFunctionFactor (double f)
 Sets the scale function factor to f.
 
Scaling scaling () const
 Returns the current scaling method.
 
void scaling (Scaling sc)
 Sets the method for scaling the inital layout to sc.
 
DRect userBoundingBox () const
 Gets the user bounding box.
 
void userBoundingBox (double xmin, double ymin, double xmax, double ymax)
 Sets the user bounding box (used if scaling method is scUserBoundingBox).
 
- Public Member Functions inherited from ogdf::LayoutModule
 LayoutModule ()
 Initializes a layout module.
 
virtual ~LayoutModule ()
 
void operator() (GraphAttributes &GA)
 Computes a layout of graph GA.
 

Protected Member Functions

void callMaster (const GraphCopy &copy, GraphAttributes &attr, DPoint &box) override
 

Additional Inherited Members

- Public Types inherited from ogdf::spring_embedder::SpringEmbedderBase
enum class  Scaling { input , userBoundingBox , scaleFunction , useIdealEdgeLength }
 The scaling method used by the algorithm. More...
 
- Protected Attributes inherited from ogdf::spring_embedder::SpringEmbedderBase
double m_avgConvergenceFactor
 convergence if avg.
 
DRect m_boundingBox
 
double m_coolDownFactor
 
double m_forceLimitStep
 
SpringForceModel m_forceModel
 
SpringForceModel m_forceModelImprove
 The used force model.
 
double m_idealEdgeLength
 The ideal edge length.
 
int m_iterations
 The number of iterations.
 
int m_iterationsImprove
 The number of iterations for the improvement phase.
 
double m_maxConvergenceFactor
 convergence if max.
 
unsigned int m_maxThreads
 The maximal number of used threads.
 
double m_minDistCC
 The minimal distance between connected components.
 
bool m_noise
 The used force model for the improvement phase.
 
double m_pageRatio
 The page ratio.
 
double m_scaleFactor
 The factor used if scaling type is scScaleFunction.
 
Scaling m_scaling
 The scaling method.
 
DRect m_userBoundingBox
 

Detailed Description

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.

Optional parameters

Fruchterman/Reingold layout provides the following optional parameters.

OptionTypeDefaultDescription
iterationsint400 The number of iterations performed in the optimization.
noisebooltrue If set to true, (small) random perturbations are performed.
minDistCCdouble20.0 The minimum distance between connected components.
pageRatiodouble1.0 The page ratio.
scalingScaling Scaling::scaleFunction The scaling method for scaling the inital layout.
scaleFunctionFactordouble8.0 The scale function factor (used if scaling = scaleFunction).
userBoundingBoxrectangle(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.

Constructor & Destructor Documentation

◆ SpringEmbedderGridVariant()

ogdf::SpringEmbedderGridVariant::SpringEmbedderGridVariant ( )
inline

Definition at line 83 of file SpringEmbedderGridVariant.h.

Member Function Documentation

◆ callMaster()

void ogdf::SpringEmbedderGridVariant::callMaster ( const GraphCopy copy,
GraphAttributes attr,
DPoint box 
)
overrideprotectedvirtual

The documentation for this class was generated from the following file: