Options
All
  • Public
  • Public/Protected
  • All
Menu

Class VOSLayoutAlgorithm Abstract

Abstract base class for layout algorithms that use the VOS quality function.

Hierarchy

Implements

Index

Properties

DEFAULT_ATTRACTION: number = 2

Default attraction parameter.

DEFAULT_REPULSION: number = 1

Default repulsion parameter.

DEFAULT_EDGE_WEIGHT_INCREMENT: number = 0

Default edge weight increment parameter.

attraction: number

Attraction parameter.

repulsion: number

Repulsion parameter.

edgeWeightIncrement: number

Edge weight increment parameter.

Constructors

Methods

  • initializeBasedOnAttractionAndRepulsionAndEdgeWeightIncrement(attraction: number, repulsion: number, edgeWeightIncrement: number): void
  • Initializes a VOS layout algorithm with a specified attraction parameter, repulsion parameter, and edge weight increment parameter.

    Parameters

    • attraction: number

      Attraction parameter

    • repulsion: number

      Repulsion parameter

    • edgeWeightIncrement: number

      Edge weight increment parameter

    Returns void

  • getAttraction(): number
  • getRepulsion(): number
  • getEdgeWeightIncrement(): number
  • Returns the edge weight increment parameter.

    Returns number

    Edge weight increment parameter

  • setAttraction(attraction: number): void
  • Sets the attraction parameter.

    Parameters

    • attraction: number

      Attraction parameter

    Returns void

  • setRepulsion(repulsion: number): void
  • Sets the repulsion parameter.

    Parameters

    • repulsion: number

      Repulsion parameter

    Returns void

  • setEdgeWeightIncrement(edgeWeightIncrement: number): void
  • Sets the edge weight increment parameter.

    Parameters

    • edgeWeightIncrement: number

      Edge weight increment parameter

    Returns void

  • Calculates the quality of a layout using the VOS quality function.

    The VOS quality function is given by

    1 / attraction * sum(a[i][j] * d(x[i], x[j]) ^
    attraction) - 1 / repulsion * sum(d(x[i], x[j]) ^
    repulsion),

    where a[i][j] is the weight of the edge between nodes i and j and x[i] = (x[i][1], x[i][2]) are the coordinates of node i. The function d(x[i], x[j]) is the Euclidean distance between nodes i and j. The sum is taken over all pairs of nodes i and j with j < i. The attraction parameter must be greater than the repulsion parameter. The lower the value of the VOS quality function, the higher the quality of the layout.

    Parameters

    Returns number

    Quality of the layout

Generated using TypeDoc