All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Types | Public Member Functions | Protected Member Functions | List of all members
NetworKit::MaxentStress Class Reference

Implementation of MaxentStress by Ganser et al. More...

#include <MaxentStress.h>

Classes

struct  ResultStats
 

Public Types

enum  GraphDistance { EDGE_WEIGHT, ALGEBRAIC_DISTANCE }
 
enum  LinearSolverType { LAMG, CONJUGATE_GRADIENT_IDENTITY_PRECONDITIONER, CONJUGATE_GRADIENT_DIAGONAL_PRECONDITIONER }
 

Public Member Functions

 MaxentStress (const Graph &G, const count dim, const count k, double tolerance, LinearSolverType linearSolverType=LAMG, bool fastComputation=false, GraphDistance graphDistance=EDGE_WEIGHT)
 
 MaxentStress (const Graph &G, const count dim, const std::vector< Point< double >> &coordinates, const count k, double tolerance, LinearSolverType linearSolverType=LAMG, bool fastComputation=false, GraphDistance graphDistance=EDGE_WEIGHT)
 
virtual ~MaxentStress ()=default
 Default destructor. More...
 
virtual void run ()
 Computes a graph drawing according to the Maxent-Stress model. More...
 
void scaleLayout ()
 Scale the layout computed by run() by a scalar s to minimize {u,v V} w_{uv} (s ||x_u - x_v|| - d_{uv}||)^2. More...
 
double computeScalingFactor ()
 Computes a scalar s s.t. More...
 
double fullStressMeasure ()
 Computes the full stress measure of the computed layout with run(). More...
 
double maxentMeasure ()
 Computes the maxent stress measure for the computed layout with run(). More...
 
double meanDistanceError ()
 
double ldme ()
 
void setQ (double q)
 Set parameter q. More...
 
void setAlpha (double alpha)
 Set parameter alpha. More...
 
void setAlphaReduction (double alphaReduction)
 Set parameter alphaReduction. More...
 
void setFinalAlpha (double finalAlpha)
 Set parameter finalAlpha. More...
 
void setConvergenceThreshold (double convThreshold)
 
double getRhs ()
 
double getApproxEntropyTerm ()
 
double getSolveTime ()
 
- Public Member Functions inherited from NetworKit::GraphLayoutAlgorithm< double >
 GraphLayoutAlgorithm (const Graph &G, count dim)
 
virtual ~GraphLayoutAlgorithm ()=default
 
virtual std::vector< Point
< double > > 
getCoordinates () const
 
virtual count numEdgeCrossings () const
 
virtual bool writeGraphToGML (const std::string &filePath)
 
virtual bool writeKinemage (const std::string &filePath)
 

Protected Member Functions

ResultStats runAlgo ()
 Calls run() and returns the corresponding stats. More...
 

Additional Inherited Members

- Protected Attributes inherited from NetworKit::GraphLayoutAlgorithm< double >
const GraphG
 
std::vector< Point< double > > vertexCoordinates
 

Detailed Description

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.

Member Enumeration Documentation

Enumerator
EDGE_WEIGHT 
ALGEBRAIC_DISTANCE 
Enumerator
LAMG 
CONJUGATE_GRADIENT_IDENTITY_PRECONDITIONER 
CONJUGATE_GRADIENT_DIAGONAL_PRECONDITIONER 

Constructor & Destructor Documentation

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

Default destructor.

Member Function Documentation

double NetworKit::MaxentStress::computeScalingFactor ( )

Computes a scalar s s.t.

{u,v V} w_{uv} (s ||x_u - x_v|| - d_{uv}||)^2 is minimized.

double NetworKit::MaxentStress::fullStressMeasure ( )

Computes the full stress measure of the computed layout with run().

Code taken and adapted from KaDraw by Christian Schulz.

Note
KaDraw: http://algo2.iti.kit.edu/kadraw/
double NetworKit::MaxentStress::getApproxEntropyTerm ( )
inline
double NetworKit::MaxentStress::getRhs ( )
inline
double NetworKit::MaxentStress::getSolveTime ( )
inline
double NetworKit::MaxentStress::ldme ( )
double NetworKit::MaxentStress::maxentMeasure ( )

Computes the maxent stress measure for the computed layout with run().

Code taken and adapted from KaDraw by Christian Schulz.

Note
KaDraw: http://algo2.iti.kit.edu/kadraw/
double NetworKit::MaxentStress::meanDistanceError ( )
void NetworKit::MaxentStress::run ( )
virtual

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

Implements NetworKit::GraphLayoutAlgorithm< double >.

MaxentStress::ResultStats NetworKit::MaxentStress::runAlgo ( )
protected

Calls run() and returns the corresponding stats.

void NetworKit::MaxentStress::scaleLayout ( )

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

void NetworKit::MaxentStress::setAlpha ( double  alpha)
inline

Set parameter alpha.

Parameters
alpha
void NetworKit::MaxentStress::setAlphaReduction ( double  alphaReduction)
inline

Set parameter alphaReduction.

Parameters
alphaReduction
void NetworKit::MaxentStress::setConvergenceThreshold ( double  convThreshold)
inline
void NetworKit::MaxentStress::setFinalAlpha ( double  finalAlpha)
inline

Set parameter finalAlpha.

Parameters
finalAlpha
void NetworKit::MaxentStress::setQ ( double  q)
inline

Set parameter q.

Parameters
q

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