LayeredLayout.Compaction.VerticalSegment
- Package
- purescript-layered-layout
- Repository
- markgrafhq/purescript-layered-layout
Port of ELK's VerticalSegment (orthogonal-only — spline tracking
omitted because markgraf only routes orthogonal edges).
A vertical segment is a piece of routed edge that runs along the y-axis. Segments at the same x-coordinate are merged before they are handed to the compactor, so the surviving record carries the union of contributing edges, bend points and ignore-spacing flags.
#newVerticalSegment Source
newVerticalSegment :: VSId -> GridPos -> GridPos -> Maybe CNodeId -> EdgeId -> VerticalSegmentConstruct a vertical segment from two bend points. Mirrors ELK's
VerticalSegment(KVector, KVector, CNode, LEdge) constructor.
#intersects Source
intersects :: VerticalSegment -> VerticalSegment -> BooleanTwo segments at the same x-coordinate (fuzzy) and overlapping in y are considered intersecting and will be merged.
#joinWith Source
joinWith :: VerticalSegment -> VerticalSegment -> VerticalSegmentMerge other into survivor. The result keeps survivor's id
and unions every contributing list. Matches ELK's joinWith.
#compareVS Source
compareVS :: VerticalSegment -> VerticalSegment -> OrderingSort order: fuzzy-equal x coordinates collapse, ties broken by
exact y. Port of ELK's compareTo.
- Modules
- LayeredLayout
- LayeredLayout.
Aesthetics - LayeredLayout.
Compaction. EdgeAwareScanlineConstraints - LayeredLayout.
Compaction. HorizontalGraphCompactor - LayeredLayout.
Compaction. LGraphToCGraphTransformer - LayeredLayout.
Compaction. NetworkSimplexCompaction - LayeredLayout.
Compaction. OneD - LayeredLayout.
Compaction. VerticalSegment - LayeredLayout.
Components - LayeredLayout.
CoordAssignment - LayeredLayout.
CrossingMin - LayeredLayout.
CrossingMin. Constraints - LayeredLayout.
CrossingMin. NorthSouth - LayeredLayout.
CrossingMin. Ports - LayeredLayout.
CycleRemoval - LayeredLayout.
DummyNodes - LayeredLayout.
EdgeLabels - LayeredLayout.
EdgeLabels. SelfLoops - LayeredLayout.
EdgeLabels. SelfLoops. Model - LayeredLayout.
EdgeLabels. SelfLoops. Routing - LayeredLayout.
EdgeRouting - LayeredLayout.
EdgeRouting. HyperEdgeCycleDetector - LayeredLayout.
EdgeRouting. HyperEdges - LayeredLayout.
EdgeRouting. LineJump - LayeredLayout.
EdgeRouting. Orthogonal - LayeredLayout.
EdgeRouting. PortAssignment - LayeredLayout.
Graph - LayeredLayout.
Grid - LayeredLayout.
JavaRandom - LayeredLayout.
LayerAssignment - LayeredLayout.
LayerAssignment. NetworkSimplex - LayeredLayout.
NetworkSimplex - LayeredLayout.
PortDistribution - LayeredLayout.
PortDummies - LayeredLayout.
Result