Class MedianHybridCrossingReduction

Sets the horizontal locations of node and edge dummy nodes on each layer. Uses median down and up weightings as well heuristic to straighten edges as far as possible.

Hierarchy (view full)

Constructors

Properties

currentBestCrossings: number = 0

The total number of crossings found in the best configuration so far

iterationsWithoutImprovement: number = 0

The total number of crossings found in the best configuration so far

Reference to the enclosing .

maxIterations: number = 24

The maximum number of iterations to perform whilst reducing edge crossings. Default is 24.

maxNoImprovementIterations: number = 2

The total number of crossings found in the best configuration so far

nestedBestRanks: null | GraphAbstractHierarchyCell[][] = null

Stores each rank as a collection of cells in the best order found for each layer so far

Methods

  • Calculates the number of edges crossings between the specified rank and the rank below it. Returns the number of edges crossings with the rank beneath

    Parameters

    • i: number

      the topmost rank of the pair ( higher rank value )

    • model: GraphHierarchyModel

      the internal model describing the hierarchy

    Returns number

  • Attempts to minimise the median placement of connected cells on this rank and one of the adjacent ranks

    Parameters

    • rankValue: number

      the layer number of this rank

    • downwardSweep: boolean

      whether or not this is a downward sweep through the graph

    Returns void

  • Calculates the median rank order positioning for the specified cell using the connected cells on the specified rank. Returns the median rank ordering value of the connected cells

    Parameters

    • connectedCells: GraphAbstractHierarchyCell[]

      the cells on the specified rank connected to the specified cell

    • rankValue: number

      the rank that the connected cell lie upon

    Returns number