Module

LayeredLayout

Package
purescript-layered-layout
Repository
markgrafhq/purescript-layered-layout

#Config Source

type Config = { compactPostRouting :: Boolean, compactionSpacings :: BetweenLayersSpacings, cycleBreaker :: CycleStrategy, edgeLabelSizes :: Map EdgeId GridSize, iterations :: Int, layerGap :: Int, layerer :: LayererStrategy, maxGapCount :: Int, nodeGap :: Int }

#defaultConfig Source

#Pipeline Source

type Pipeline = { acyclic :: AcyclicResult, components :: Array ComponentCache, initialRandom :: Random, labels :: LabelState, layered :: LayeredGraph, loops :: LoopState, ordered :: Array (Array NodeId), placements :: Array NodePlacement, portDummies :: State, portOrder :: PortOrder, random :: Random, routedRandom :: Random, withDummies :: DummyResult }

Cached intermediate results from each pipeline phase.

#ComponentCache Source

type ComponentCache = { initialRandom :: Random, layerCount :: Int, layerOffset :: Int, nodes :: Set NodeId, offset :: GridPos, random :: Random, routedRandom :: Random }

#LayoutOutput Source

type LayoutOutput = { pipeline :: Pipeline, result :: LayoutResult }

#full Source

full :: Config -> Graph -> LayoutOutput

Full pipeline from scratch.

#fromDummies Source

fromDummies :: Config -> Graph -> Pipeline -> LayoutOutput

Rerun from dummy node insertion (node moved to different layer).

#fromCrossMin Source

fromCrossMin :: Config -> Graph -> Pipeline -> LayoutOutput

Rerun from crossing minimization (node order changed).

#fromCoords Source

fromCoords :: Config -> Graph -> Pipeline -> LayoutOutput

Rerun from coordinate assignment (node size or constraint changed).

#fromRouting Source

fromRouting :: Config -> Graph -> Pipeline -> LayoutResult

Rerun edge routing only (node position changed, same order).