Bases: object
Abstract base class for graph drawing algorithms.
Computes approximation (in parallel) of the Spanning Edge Centrality.
List of coordinates for each node.
list(tuple(float, float))
Computes approximation (in parallel) of the Spanning Edge Centrality.
Number of edge crossings.
int
Executes the graph layout algorithm.
self
Writes the graph and its layout to a .gml file at the specified path.
path (str) – Path where the graph file should be created.
Writes the graph and its layout to a file at the specified path.
path (str) – Path where the graph file should be created.
Bases: GraphLayoutAlgorithm
Implementation of MaxentStress by Gansner et al. using a Laplacian system solver. @see Gansner, Emden R., Yifan Hu, and Steve North. “A maxent-stress model for graph layout.” Visualization and Computer Graphics, IEEE Transactions on 19, no. 6 (2013): 927-940.
Parameter graphDistance
can be one of the following:
networkit.viz.GraphDistance.EdgeWeight
networkit.viz.GraphDistance.AlgebraicDistance
Parameter linearSolverType
can be one of the following:
networkit.viz.LinearSolverType.LAMG
networkit.viz.LinearSolverType.CONJUGATE_GRADIENT_IDENTITY_PRECONDITIONER
networkit.viz.LinearSolverType.CONJUGATE_GRADIENT_DIAGONAL_PRECONDITIONER
G (networkit.Graph) – The (connected) graph to be handled.
dim (int) – Number of dimensions.
k (int) – Node distance to take into account for computation. The higher k, the longer computation takes to complete.
coordinates (list(tuple(float, float)), optional) – Fixed coordinates. Default: list()
tolerance (float, optional) – The tolerance of the solver. Default: 1e-5
linearSolverType (networkit.viz.LinearSolverType, optional) – The type of linear solver. Default: networkit.viz.LinearSolverType.LAMG
fastComputation (bool, optional) – Decides whether or not slightly faster computation should be employed, leading to slightly worse results. Default: False
graphDistance (networkit.viz.GraphDistance, optional) – Decides what type of graph distance should be utilised. Default: networkit.community.GraphDistance.EdgeWeight
Computes a scalar s s.t. \(\sum_{u,v \in V} w_{uv} (s ||x_u - x_v|| - d_{uv}||)^2\) is minimized.
Computes the full stress measure of the computed layout with run().
Returns entropy term value.
The parameter value.
float
Returns rhs value.
The parameter value.
float
Returns solve time value.
The parameter value.
float
Computes the ldme.
Computes the maxent stress measure for the computed layout with run().
Computes mean distance error.
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\).
Set parameter alpha.
alpha (float) – New parameter value.
Set parameter alphaReduction.
alphaReduction (float) – New parameter value.
Set parameter convThreshold.
convThreshold (float) – New parameter value.
Set parameter finalAlpha.
finalAlpha (float) – New parameter value.
Set parameter q.
q (float) – New parameter value.
Bases: GraphLayoutAlgorithm
Implementation of PivotMDS proposed by Brandes and Pich.
G (networkit.Graph) – The graph to be handled by the algorithm.
dim (int) – Number of dimensions.
numberOfPivots (int) – Number of pivots for the algorithm.