Interface DecrossOpt

a Decross that minimizes the number of crossings

This method brute forces an NP-Complete problem, and as such may run for an exceedingly long time on large graphs. As a result, any graph that is probably too large will throw an error instead of running. Use with care.

Create with decrossOpt.

Hierarchy

  • Decross<unknown, unknown>
    • DecrossOpt
  • remove crossings from a layered graph

    Parameters

    • layers: SugiNode<unknown, unknown>[][]

      the layers of nodes that this should rearrange.

    Returns void

Methods

Methods

  • set whether to also minimize distance between nodes that share an ancestor

    This setting adds more variables and constraints, and so will make the decrossing step take longer, but will likely produce a better layout as nodes that share common parents or children will be put closer together if it doesn't affect the number of crossings. It is especially usefuly for ancestry layoutss where nodes that share a child will inherently be put closer together even if it doesn't reduce the number of crossings.

    (default: false)

    Parameters

    • val: boolean

    Returns DecrossOpt

  • get whether the current layout minimized distance

    Returns boolean

Generated using TypeDoc