Class StressMinimizationImplementation

java.lang.Object
org.vanted.plugins.layout.stressminimization.StressMinimizationImplementation

public class StressMinimizationImplementation
extends Object
  • Constructor Details

    • StressMinimizationImplementation

      public StressMinimizationImplementation​(IndexedNodeSet nodes, StressMinimizationLayout callingLayout, boolean useLandmarks, int numberOfLandmarks, int alpha, double stressChangeEpsilon, double initialStressPercentage, double minimumNodeMovementThreshold, double iterationsThreshold, int edgeScalingFactor)
      Creates a new StressMinimizationImplementation working on the given list of nodes and using callingLayout for pausing and stopping behavior
      Parameters:
      nodes - The nodes to layout.
      callingLayout - The StressMinimizationLayout instance creating this instance
      numberOfLandmarks -
      alpha - alpha exponent for weighting.
      stressChangeEpsilon - Stress change threshold below which execution will be terminated
      initialStressPercentage - The initial stress percentage below which execution will be terminated
      minimumNodeMovementThreshold - The minimum node movement threshold below which execution will be terminated
      iterationsThreshold - The maximal number of iterations above which execution will be terminated
  • Method Details

    • calculateLayout

      public void calculateLayout()
      Calculates an optimized layout for this instances nodes.
    • calcPairwiseDistances

      public org.apache.commons.math3.linear.RealMatrix calcPairwiseDistances​(IndexedNodeSet nodes)
      Calculates the distance matrix of the given nodes set.
      Parameters:
      nodes - A list of nodes. For these nodes the distances to the other nodes in the set will be calculated.
      Returns:
      the distance matrix
    • calcDistances

      public org.apache.commons.math3.linear.RealVector calcDistances​(int fromIndex)
      Calculates the distance vector from the node at the specified index to all other nodes.
      Parameters:
      fromIndex - the distances from this node to all others will be calculated.
      Returns:
      the distance vector from the from node to all others
    • getLayoutSupplier

      public Supplier<HashMap<Node,​Vector2d>> getLayoutSupplier()