Class MaxentStress

Nested Relationships

Nested Types

Inheritance Relationships

Base Type

Class Documentation

class MaxentStress : public NetworKit::GraphLayoutAlgorithm<double>

Implementation of MaxentStress by Ganser et al. using a laplacian system solver.

See also

Ganser, Emden R., Yifan Hu and Steve North. “A maxentstress model for graph layout.” Visualisation and Computer Graphics, IEEE Transsactions on 19, no. 6 (2013): 927-940.

Public Types

enum GraphDistance

Values:

enumerator EDGE_WEIGHT
enumerator ALGEBRAIC_DISTANCE
enum LinearSolverType

Values:

enumerator LAMG
enumerator CONJUGATE_GRADIENT_IDENTITY_PRECONDITIONER
enumerator CONJUGATE_GRADIENT_DIAGONAL_PRECONDITIONER

Public Functions

MaxentStress(const Graph &G, count dim, count k, double tolerance, LinearSolverType linearSolverType = LAMG, bool fastComputation = false, GraphDistance graphDistance = EDGE_WEIGHT)
MaxentStress(const Graph &G, count dim, const std::vector<Point<double>> &coordinates, count k, double tolerance, LinearSolverType linearSolverType = LAMG, bool fastComputation = false, GraphDistance graphDistance = EDGE_WEIGHT)
~MaxentStress() override = default

Default destructor.

virtual void run() override

Computes a graph drawing according to the Maxent-Stress model.

void scaleLayout()

Scale the layout computed by run() by a scalar s to minimize \sum_{u,v \in V} w_{uv} (s ||x_u - x_v|| - d_{uv}||)^2

double computeScalingFactor()

Computes a scalar s s.t. \sum_{u,v \in V} w_{uv} (s ||x_u - x_v|| - d_{uv}||)^2 is minimized.

double fullStressMeasure()

Computes the full stress measure of the computed layout with run(). Code taken and adapted from KaDraw by Christian Schulz.

double maxentMeasure()

Computes the maxent stress measure for the computed layout with run(). Code taken and adapted from KaDraw by Christian Schulz.

double meanDistanceError()
double ldme()
inline void setQ(double q)

Set parameter q.

Parameters:

q

inline void setAlpha(double alpha)

Set parameter alpha.

Parameters:

alpha

inline void setAlphaReduction(double alphaReduction)

Set parameter alphaReduction.

Parameters:

alphaReduction

inline void setFinalAlpha(double finalAlpha)

Set parameter finalAlpha.

Parameters:

finalAlpha

inline void setConvergenceThreshold(double convThreshold)
inline double getRhs()
inline double getApproxEntropyTerm()
inline double getSolveTime()
struct ResultStats

Public Members

double rhsTime = 0.0
double approxEntropyTerm = 0.0
double solveTime = 0.0