d3-dag
    Preparing search index...

    Interface TwolayerOpt

    a Twolayer for optimal decrossing of a single target layer

    The opt order operator orders the relevant layer to minimize the number of crossings. This is expensive, but not nearly as expensive as optimizing all crossings initially.

    Create with twolayerOpt.

    interface TwolayerOpt {
        check(val: OptChecking): TwolayerOpt;
        check(): OptChecking;
        dist(val: boolean): TwolayerOpt;
        dist(): boolean;
        (
            topLayer: SugiNode<unknown, unknown>[],
            bottomLayer: SugiNode<unknown, unknown>[],
            topDown: boolean,
        ): void;
    }

    Hierarchy (View Summary)

    • Parameters

      • topLayer: SugiNode<unknown, unknown>[]
      • bottomLayer: SugiNode<unknown, unknown>[]
      • topDown: boolean

      Returns void

    Index

    Methods

    Methods

    • set whether to also minimize distance between nodes with common ancestors

      This adds more variables and constraints so will take longer, but will likely produce a better layout. It is the same as DecrossOpt#dist.

      (default: false)

      Parameters

      • val: boolean

      Returns TwolayerOpt

    • get whether the current layout minimizes distance

      Returns boolean