Interface CoordSimplex<Ops>

a Coord that places nodes to maximize edge verticality

The minimization mirrors that of Gansner, Emden R., et al. "A technique for drawing directed graphs." IEEE Transactions on Software Engineering (1993). This tries to make nodes close together, assigning greater weight for nodes as part of an edge.

Create with coordSimplex.

interface CoordSimplex<Ops extends CoordSimplexOps> {
    weight<NewWeight extends SimplexWeight<never, never>>(
        val: NewWeight,
    ): CoordSimplex<{ weight: NewWeight }>;
    weight(): Ops["weight"];
    <N extends unknown, L extends unknown>(
        layers: SugiNode<N, L>[][],
        sep: SugiSeparation<N, L>,
    ): number;
}

Type Parameters

Hierarchy (View Summary)

  • assign coordinates to a layered graph

    Type Parameters

    • N extends unknown
    • L extends unknown

    Parameters

    • layers: SugiNode<N, L>[][]

      a layered graph of sugiyama nodes

    • sep: SugiSeparation<N, L>

      how much horizontal separation should exist between nodes

    Returns number

    width - the total width of the layout

Methods

Methods

  • set the weights for how vertical edges should be

    The higher the weight, the more vertical an edge should be. Weights are are triplets of numbers describing the weight for different parts of edge. The first is between true nodes, the second is for near true nodes, and the last is for the extents of long edges. Generally the number should be increasing, and all must be positive.

    (default: [1, 2, 8])

    Type Parameters

    Parameters

    Returns CoordSimplex<{ weight: NewWeight }>

  • gets the current weight accessor

    Returns Ops["weight"]