Interface TwolayerAgg<Agg>

a Twolayer that orders nodes based off aggregated ancestor indices

This is much faster than twolayerOpt, and often produces comparable or better layouts. Nodes without ancestors will be placed first to minimize the distance between nodes with common ancestors, and then to minimize rank inversions with respect to the initial ordering.

Create with twolayerAgg.

interface TwolayerAgg<Agg extends Aggregator = Aggregator> {
    aggregator<NewAgg extends Aggregator>(val: NewAgg): TwolayerAgg<NewAgg>;
    aggregator(): Agg;
    (
        topLayer: SugiNode<unknown, unknown>[],
        bottomLayer: SugiNode<unknown, unknown>[],
        topDown: boolean,
    ): void;
}

Type Parameters

Hierarchy (View Summary)

  • rearrange one layer conditioned on another

    Parameters

    • topLayer: SugiNode<unknown, unknown>[]

      the top layer

    • bottomLayer: SugiNode<unknown, unknown>[]

      the bottom layer

    • topDown: boolean

      if true rearrange bottomLayer, else rearrange topLayer

    Returns void

Methods

Methods