Home
package
Compound
uniform_insets
default_insets
default_group
default_layered
default_exact_layered
default_routing
default_input
default_run
layout
Algorithm
Routing
Target
LayeredOptions
ExactLayeredOptions
Insets
Header
Input
RunArgs
Problem
GroupGeometry
Result
Constrained
default_input
default_settings
default_run
prepare
layout_prepared
layout
Constraint
Input
Settings
Problem
RunArgs
Result
ForceLayout
force_defaults
force_default_run
prepare_force
place_force
run_force
layout_force
Geom
point
saturate
hypot
empty_bounds
clip_to_node
Point
Rect
Route
Graph
default_spec
default_input
default_circular_settings
prepare_circular
layout_circular_prepared
layout_circular
default_force_settings
default_force_run
layout_force
default_stress_settings
default_stress_run
layout_stress
default_radial_settings
layout_radial
Spec
Input
CircularSettings
Problem
Result
Layered
problem_to_str
default_input
default_settings
default_run
prepare
layout_prepared
layout
default_exact_settings
prepare_exact
layout_exact_prepared
layout_exact
LayerConstraint
Input
Settings
RunArgs
Problem
Result
ExactSettings
ExactResult
Metrics
area
crossings
bends
aspect_ratio
separation_violations
displacement
stress
Overlap
remove
Pack
default_settings
pack
row
Settings
RadialLayout
radial_defaults
prepare_radial
run_radial
layout_radial
Route
default_input
default_settings
layout
Side
Endpoint
Attachment
AttachmentRule
Outline
BoundaryRule
Group
Membership
GroupAttachmentRule
LabelPlacement
EdgeLabel
SharedEndRule
WaypointRule
GuideRule
Input
Settings
SelectedAttachment
EdgeAttachments
GroupCrossing
SharedRoute
Result
Problem
is_eq
to_str
StressLayout
stress_defaults
stress_default_run
prepare_stress
place_stress
run_stress
layout_stress
Tree
default_input
default_settings
default_radial_settings
prepare
layout_prepared
layout
prepare_radial
layout_radial_prepared
layout_radial
Spec
Input
Settings
RadialSettings
Problem
Result
Compound
.
uniform_insets
:
F64
->
Insets
Compound
.
default_insets
:
Insets
Compound
.
default_group
:
Compound
Compound
.
default_layered
:
LayeredOptions
Compound
.
default_exact_layered
:
ExactLayeredOptions
Compound
.
default_routing
:
Routing
Compound
.
default_input
:
Input
Compound
.
default_run
:
RunArgs
Compound
.
layout
:
Input
,
RunArgs
->
[
Ok
(
Result
),
Err
(
List
(
Problem
))]
Compound
.
Algorithm
: [
Rows
({ gap :
F64
}),
Columns
({ gap :
F64
}),
LayeredSweep
(
LayeredOptions
),
LayeredExact
(
ExactLayeredOptions
),
GraphCircular
(
CircularSettings
),
GraphForce
({ settings : { node_gap :
F64
, repulsion :
F64
, gravity :
F64
, opening_angle :
F64
, max_iterations :
U64
, tolerance :
F64
}, pins :
List
({ node :
U64
, x :
F64
, y :
F64
}) }),
GraphStress
({ settings : { node_gap :
F64
, mode : [
Exact
,
Pivots
(
U64
)], max_iterations :
U64
, tolerance :
F64
}, pins :
List
({ node :
U64
, x :
F64
, y :
F64
}) }),
GraphRadial
({ root : [
Auto
,
Node
(
U64
)], ring_gap :
F64
, node_gap :
F64
, start_angle :
F64
, winding : [
Clockwise
,
CounterClockwise
] }),
TreeTidy
(
Settings
),
TreeRadial
(
RadialSettings
),
ConstrainedStress
({ settings : { node_gap :
F64
, max_iterations :
U64
, tolerance :
F64
}, constraints :
List
(
Constraint
), pins :
List
({ node :
U64
, x :
F64
, y :
F64
}) })]
Compound
.
Routing
: [
Straight
,
Orthogonal
(
Settings
)]
Compound
.
Target
: [
Node
(
U64
),
Group
(
U64
)]
Compound
.
LayeredOptions
: { settings :
Settings
, edge_weights :
List
({ edge :
U64
, weight :
F64
}), min_spans :
List
({ edge :
U64
, span :
U64
}), same_layers :
List
({ first :
Target
, second :
Target
}), sibling_order :
List
({ before :
Target
, after :
Target
}), non_ranking_edges :
List
(
U64
) }
Compound
.
ExactLayeredOptions
: { settings :
ExactSettings
, edge_weights :
List
({ edge :
U64
, weight :
F64
}), min_spans :
List
({ edge :
U64
, span :
U64
}), same_layers :
List
({ first :
Target
, second :
Target
}), sibling_order :
List
({ before :
Target
, after :
Target
}), non_ranking_edges :
List
(
U64
) }
Compound
.
Insets
: { top :
F64
, right :
F64
, bottom :
F64
, left :
F64
}
Compound
.
Header
: [
None
,
Reserve
({ height :
F64
})]
Compound
.
Input
: { graph : { nodes :
List
({ width :
F64
, height :
F64
}), edges :
List
({ from :
U64
, to :
U64
}) }, attachments :
List
(
AttachmentRule
), group_attachments :
List
(
GroupAttachmentRule
), boundaries :
List
(
BoundaryRule
), edge_labels :
List
(
EdgeLabel
), root :
Compound
, routing :
Routing
}
Compound
.
RunArgs
: { seed :
U32
, hints :
List
({ x :
F64
, y :
F64
}) }
Compound
.
Problem
: [
InvalidNodeWidth
(
U64
),
InvalidNodeHeight
(
U64
),
MissingEdgeStart
(
U64
,
U64
),
MissingEdgeEnd
(
U64
,
U64
),
MissingMember
(
U64
),
DuplicateMember
(
U64
),
MissingGroupNode
(
U64
,
U64
),
InvalidInset
(
U64
,
Side
),
InvalidHeaderHeight
(
U64
),
InvalidRootGroupAttachment
(
U64
),
InvalidGroupAttachmentEdge
(
U64
),
InvalidGroupAttachmentGroup
(
U64
),
InvalidGroupAttachmentOffset
(
U64
),
DuplicateGroupAttachment
(
U64
),
GroupAttachmentNotBoundary
(
U64
),
GroupAttachmentNeedsOrthogonal
(
U64
),
HeaderAttachmentConflict
(
U64
,
U64
),
InvalidMinimumWidth
(
U64
),
InvalidMinimumHeight
(
U64
),
InvalidGap
(
U64
),
MissingPin
(
U64
,
U64
),
InvalidPin
(
U64
,
U64
),
MissingConstraintNode
(
U64
,
U64
,
U64
),
MissingLayerTarget
(
U64
,
U64
,
Target
),
LayerTargetsNotSiblings
(
U64
,
U64
),
MissingNonRankingEdge
(
U64
,
U64
,
U64
),
NonRankingEdgeNotBetweenSiblings
(
U64
,
U64
,
U64
),
InvalidGroupAlgorithm
(
U64
),
InvalidTreeTopology
(
U64
),
RouteProblem
(
Problem
)]
Compound
.
GroupGeometry
: { rect :
Rect
, content :
Rect
, header : [
None
,
Some
(
Rect
)] }
Compound
.
Result
: { layout : { positions :
List
({ x :
F64
, y :
F64
}), routes :
List
(
Route
), bounds : { x :
F64
, y :
F64
, width :
F64
, height :
F64
} }, groups :
List
(
GroupGeometry
), label_anchors :
List
({ x :
F64
, y :
F64
}), attachments :
List
(
EdgeAttachments
), group_crossings :
List
(
List
(
GroupCrossing
)) }
Constrained
.
default_input
:
Input
Constrained
.
default_settings
:
Settings
Constrained
.
default_run
:
RunArgs
Constrained
.
prepare
:
Input
,
Settings
->
[
Ok
(
ConstrainedPrepared
),
Err
(
List
(
Problem
))]
Constrained
.
layout_prepared
:
ConstrainedPrepared
,
RunArgs
->
Result
Constrained
.
layout
:
Input
,
Settings
,
RunArgs
->
[
Ok
(
Result
),
Err
(
List
(
Problem
))]
Constrained
.
Constraint
: [
Separate
({ axis : [
X
,
Y
], first :
U64
, second :
U64
, gap :
F64
}),
Align
({ axis : [
X
,
Y
], nodes :
List
(
U64
) }),
Inside
({ axis : [
X
,
Y
], nodes :
List
(
U64
), low :
F64
, high :
F64
})]
Constrained
.
Input
: { graph : { nodes :
List
({ width :
F64
, height :
F64
}), edges :
List
({ from :
U64
, to :
U64
}) }, constraints :
List
(
Constraint
) }
Constrained
.
Settings
: { node_gap :
F64
, max_iterations :
U64
, tolerance :
F64
, pins :
List
({ node :
U64
, x :
F64
, y :
F64
}) }
Constrained
.
Problem
: [
InvalidNodeWidth
(
U64
),
InvalidNodeHeight
(
U64
),
MissingEdgeStart
(
U64
,
U64
),
MissingEdgeEnd
(
U64
,
U64
),
InvalidNodeGap
,
InvalidTolerance
,
MissingPin
(
U64
),
InvalidPin
(
U64
),
MissingConstraintNode
(
U64
,
U64
),
InvalidConstraintGap
(
U64
),
InvalidConstraintBand
(
U64
),
UnsatisfiableSeparation
(
U64
),
ConflictingInside
(
U64
),
ConflictingPin
(
U64
)]
Constrained
.
RunArgs
: { seed :
U32
, hints :
List
({ x :
F64
, y :
F64
}) }
Constrained
.
Result
: { layout : { positions :
List
({ x :
F64
, y :
F64
}), bounds : { x :
F64
, y :
F64
, width :
F64
, height :
F64
}, routes :
List
(
Route
) }, convergence : { iterations :
U64
, converged :
Bool
}, unsatisfied :
List
(
U64
) }
ForceLayout
.
force_defaults
:
Settings
ForceLayout
.
force_default_run
:
RunArgs
ForceLayout
.
prepare_force
:
Spec
,
Settings
->
[
Ok
(
ForcePrepared
),
Err
(
List
(
Problem
))]
ForceLayout
.
place_force
:
ForcePrepared
,
RunArgs
->
{ positions :
List
({ x :
F64
, y :
F64
}), components :
List
(
U64
), convergence : { iterations :
U64
, converged :
Bool
} }
ForceLayout
.
run_force
:
ForcePrepared
,
RunArgs
->
Result
ForceLayout
.
layout_force
:
Spec
,
Settings
,
RunArgs
->
[
Ok
(
Result
),
Err
(
List
(
Problem
))]
Geom
.
point
:
F64
,
F64
->
Point
Geom
.
saturate
:
F64
->
F64
Geom
.
hypot
:
F64
,
F64
->
F64
Geom
.
empty_bounds
:
Rect
Geom
.
clip_to_node
: { x :
F64
, y :
F64
}, { width :
F64
, height :
F64
}, { x :
F64
, y :
F64
}
->
Point
Geom
.
Point
: { x :
F64
, y :
F64
}
Geom
.
Rect
: { x :
F64
, y :
F64
, width :
F64
, height :
F64
}
Geom
.
Route
: [
Line
({ x :
F64
, y :
F64
}, { x :
F64
, y :
F64
}),
Polyline
(
List
({ x :
F64
, y :
F64
})),
Curves
(
List
({ from : { x :
F64
, y :
F64
}, ctl_a : { x :
F64
, y :
F64
}, ctl_b : { x :
F64
, y :
F64
}, to : { x :
F64
, y :
F64
} }))]
Graph
.
default_spec
:
Spec
Graph
.
default_input
:
Input
Graph
.
default_circular_settings
:
CircularSettings
Graph
.
prepare_circular
:
Input
,
CircularSettings
->
[
Ok
(
CircularPrepared
),
Err
(
List
(
Problem
))]
Graph
.
layout_circular_prepared
:
CircularPrepared
->
Result
Graph
.
layout_circular
:
Input
,
CircularSettings
->
[
Ok
(
Result
),
Err
(
List
(
Problem
))]
Graph
.
default_force_settings
: { node_gap :
F64
, repulsion :
F64
, gravity :
F64
, opening_angle :
F64
, max_iterations :
U64
, tolerance :
F64
, pins :
List
({ node :
U64
, x :
F64
, y :
F64
}) }
Graph
.
default_force_run
: { seed :
U32
, hints :
List
({ x :
F64
, y :
F64
}) }
Graph
.
layout_force
:
Input
, { node_gap :
F64
, repulsion :
F64
, gravity :
F64
, opening_angle :
F64
, max_iterations :
U64
, tolerance :
F64
, pins :
List
({ node :
U64
, x :
F64
, y :
F64
}) }, { seed :
U32
, hints :
List
({ x :
F64
, y :
F64
}) }
->
[
Ok
({ layout : { positions :
List
({ x :
F64
, y :
F64
}), bounds : { x :
F64
, y :
F64
, width :
F64
, height :
F64
}, routes :
List
(
Route
) }, components :
List
(
U64
), convergence : { iterations :
U64
, converged :
Bool
} }),
Err
(
List
([
InvalidNodeWidth
(
U64
),
InvalidNodeHeight
(
U64
),
MissingEdgeStart
(
U64
,
U64
),
MissingEdgeEnd
(
U64
,
U64
),
InvalidNodeGap
,
InvalidRepulsion
,
InvalidGravity
,
InvalidOpeningAngle
,
InvalidTolerance
,
MissingPin
(
U64
),
InvalidPin
(
U64
)]))]
Graph
.
default_stress_settings
: { node_gap :
F64
, mode : [
Exact
,
Pivots
(
U64
)], max_iterations :
U64
, tolerance :
F64
, pins :
List
({ node :
U64
, x :
F64
, y :
F64
}) }
Graph
.
default_stress_run
: { seed :
U32
, hints :
List
({ x :
F64
, y :
F64
}) }
Graph
.
layout_stress
:
Input
, { node_gap :
F64
, mode : [
Exact
,
Pivots
(
U64
)], max_iterations :
U64
, tolerance :
F64
, pins :
List
({ node :
U64
, x :
F64
, y :
F64
}) }, { seed :
U32
, hints :
List
({ x :
F64
, y :
F64
}) }
->
[
Ok
({ layout : { positions :
List
({ x :
F64
, y :
F64
}), bounds : { x :
F64
, y :
F64
, width :
F64
, height :
F64
}, routes :
List
(
Route
) }, components :
List
(
U64
), convergence : { iterations :
U64
, converged :
Bool
} }),
Err
(
List
([
InvalidNodeWidth
(
U64
),
InvalidNodeHeight
(
U64
),
MissingEdgeStart
(
U64
,
U64
),
MissingEdgeEnd
(
U64
,
U64
),
InvalidNodeGap
,
InvalidPivotCount
,
InvalidTolerance
,
MissingPin
(
U64
),
InvalidPin
(
U64
)]))]
Graph
.
default_radial_settings
: { root : [
Auto
,
Node
(
U64
)], ring_gap :
F64
, node_gap :
F64
, start_angle :
F64
, winding : [
Clockwise
,
CounterClockwise
] }
Graph
.
layout_radial
:
Input
, { root : [
Auto
,
Node
(
U64
)], ring_gap :
F64
, node_gap :
F64
, start_angle :
F64
, winding : [
Clockwise
,
CounterClockwise
] }
->
[
Ok
({ layout : { positions :
List
({ x :
F64
, y :
F64
}), bounds : { x :
F64
, y :
F64
, width :
F64
, height :
F64
}, routes :
List
(
Route
) }, rings :
List
(
U64
), components :
List
(
U64
) }),
Err
(
List
([
InvalidNodeWidth
(
U64
),
InvalidNodeHeight
(
U64
),
MissingEdgeStart
(
U64
,
U64
),
MissingEdgeEnd
(
U64
,
U64
),
InvalidRingGap
,
InvalidNodeGap
,
InvalidStartAngle
,
InvalidRoot
(
U64
)]))]
Graph
.
Spec
: { nodes :
List
({ width :
F64
, height :
F64
}), edges :
List
({ from :
U64
, to :
U64
}) }
Graph
.
Input
:
Spec
Graph
.
CircularSettings
: { node_gap :
F64
, start_angle :
F64
, winding : [
Clockwise
,
CounterClockwise
] }
Graph
.
Problem
: [
InvalidNodeWidth
(
U64
),
InvalidNodeHeight
(
U64
),
MissingEdgeStart
(
U64
,
U64
),
MissingEdgeEnd
(
U64
,
U64
),
InvalidNodeGap
,
InvalidStartAngle
]
Graph
.
Result
: { layout : { positions :
List
({ x :
F64
, y :
F64
}), bounds : { x :
F64
, y :
F64
, width :
F64
, height :
F64
}, routes :
List
(
Route
) }, order :
List
(
U64
) }
Layered
.
problem_to_str
:
Problem
->
Str
Layered
.
default_input
:
Input
Layered
.
default_settings
:
Settings
Layered
.
default_run
:
RunArgs
Layered
.
prepare
:
Input
,
Settings
->
[
Ok
(
Prepared
),
Err
(
List
(
Problem
))]
Layered
.
layout_prepared
:
Prepared
,
RunArgs
->
Result
Layered
.
layout
:
Input
,
Settings
,
RunArgs
->
[
Ok
(
Result
),
Err
(
List
(
Problem
))]
Layered
.
default_exact_settings
:
ExactSettings
Layered
.
prepare_exact
:
Input
,
ExactSettings
->
[
Ok
(
ExactPrepared
),
Err
(
List
(
Problem
))]
Layered
.
layout_exact_prepared
:
ExactPrepared
->
ExactResult
Layered
.
layout_exact
:
Input
,
ExactSettings
->
[
Ok
(
ExactResult
),
Err
(
List
(
Problem
))]
Layered
.
LayerConstraint
: [
SameLayer
({ first :
U64
, second :
U64
}),
BeforeLayer
({ first :
U64
, second :
U64
, minimum_span :
U64
}),
FirstLayer
(
U64
),
LastLayer
(
U64
)]
Layered
.
Input
: { graph : { nodes :
List
({ width :
F64
, height :
F64
}), edges :
List
({ from :
U64
, to :
U64
}) }, edge_weights :
List
({ edge :
U64
, weight :
F64
}), min_spans :
List
({ edge :
U64
, span :
U64
}), attachments :
List
(
AttachmentRule
), boundaries :
List
(
BoundaryRule
), edge_labels :
List
(
EdgeLabel
), layer_constraints :
List
(
LayerConstraint
), order_constraints :
List
({ before :
U64
, after :
U64
}), non_ranking_edges :
List
(
U64
) }
Layered
.
Settings
: { node_gap :
F64
, layer_gap :
F64
, routing :
Settings
, direction : [
Down
,
Up
,
Left
,
Right
], max_sweeps :
U64
, pins :
List
({ node :
U64
, x :
F64
, y :
F64
}) }
Layered
.
RunArgs
: { hints :
List
({ node :
U64
, x :
F64
, y :
F64
}), stability : [
Reflow
,
PreserveOrder
] }
Layered
.
Problem
: [
InvalidNodeWidth
(
U64
),
InvalidNodeHeight
(
U64
),
MissingEdgeStart
(
U64
,
U64
),
MissingEdgeEnd
(
U64
,
U64
),
InvalidNodeGap
,
InvalidLayerGap
,
MissingEdgeWeightEdge
(
U64
),
InvalidEdgeWeight
(
U64
),
NonRankingEdgeWeight
(
U64
,
U64
),
MissingMinimumSpanEdge
(
U64
),
InvalidMinimumSpan
(
U64
),
NonRankingMinimumSpan
(
U64
,
U64
),
InvalidAttachmentEdge
(
U64
),
InvalidAttachmentOffset
(
U64
),
DuplicateAttachment
(
U64
),
InvalidBoundaryNode
(
U64
),
DuplicateBoundary
(
U64
),
MissingPinNode
(
U64
,
U64
),
InvalidPin
(
U64
),
DuplicatePin
(
U64
),
ConflictingPins
,
InvalidEdgeLabelEdge
(
U64
),
InvalidEdgeLabelWidth
(
U64
),
InvalidEdgeLabelHeight
(
U64
),
MissingLayerConstraintNode
(
U64
,
U64
),
InvalidLayerConstraintSpan
(
U64
),
ConflictingLayerConstraints
,
MissingOrderConstraintNode
(
U64
,
U64
),
OrderConstraintAcrossLayers
(
U64
),
ConflictingOrderConstraints
,
MissingNonRankingEdge
(
U64
,
U64
),
DuplicateNonRankingEdge
(
U64
),
InvalidRouting
(
Problem
)]
Layered
.
Result
: { layout : { positions :
List
({ x :
F64
, y :
F64
}), bounds : { x :
F64
, y :
F64
, width :
F64
, height :
F64
}, routes :
List
(
Route
) }, layers :
List
(
U64
), backward_edges :
List
(
U64
), label_anchors :
List
({ x :
F64
, y :
F64
}), attachments :
List
(
EdgeAttachments
) }
Layered
.
ExactSettings
: { node_gap :
F64
, layer_gap :
F64
, routing :
Settings
, effort_cap :
U64
, direction : [
Down
,
Up
,
Left
,
Right
], pins :
List
({ node :
U64
, x :
F64
, y :
F64
}) }
Layered
.
ExactResult
: { layout : { positions :
List
({ x :
F64
, y :
F64
}), bounds : { x :
F64
, y :
F64
, width :
F64
, height :
F64
}, routes :
List
(
Route
) }, layers :
List
(
U64
), backward_edges :
List
(
U64
), proven_optimal :
Bool
, label_anchors :
List
({ x :
F64
, y :
F64
}), attachments :
List
(
EdgeAttachments
) }
Metrics
.
area
: { x :
F64
, y :
F64
, width :
F64
, height :
F64
}
->
F64
Metrics
.
crossings
:
List
(
Route
)
->
U64
Metrics
.
bends
:
List
(
Route
)
->
U64
Metrics
.
aspect_ratio
: { x :
F64
, y :
F64
, width :
F64
, height :
F64
}
->
F64
Metrics
.
separation_violations
:
List
({ x :
F64
, y :
F64
}),
List
({ width :
F64
, height :
F64
}),
F64
->
U64
Metrics
.
displacement
:
List
({ x :
F64
, y :
F64
}),
List
({ x :
F64
, y :
F64
})
->
{ mean :
F64
, max :
F64
}
Metrics
.
stress
: { nodes :
List
({ width :
F64
, height :
F64
}), edges :
List
({ from :
U64
, to :
U64
}) },
List
({ x :
F64
, y :
F64
}),
F64
->
F64
Overlap
.
remove
:
List
({ x :
F64
, y :
F64
}),
List
({ width :
F64
, height :
F64
}),
F64
->
List
({ x :
F64
, y :
F64
})
Pack
.
default_settings
:
Settings
Pack
.
pack
:
List
({ width :
F64
, height :
F64
}),
Settings
->
{ positions :
List
({ x :
F64
, y :
F64
}), bounds : { x :
F64
, y :
F64
, width :
F64
, height :
F64
} }
Pack
.
row
:
List
({ width :
F64
, height :
F64
}),
F64
->
{ positions :
List
({ x :
F64
, y :
F64
}), bounds : { x :
F64
, y :
F64
, width :
F64
, height :
F64
} }
Pack
.
Settings
: { gap :
F64
, target_aspect :
F64
}
RadialLayout
.
radial_defaults
:
Settings
RadialLayout
.
prepare_radial
:
Spec
,
Settings
->
[
Ok
(
GraphRadialPrepared
),
Err
(
List
(
Problem
))]
RadialLayout
.
run_radial
:
GraphRadialPrepared
->
Result
RadialLayout
.
layout_radial
:
Spec
,
Settings
->
[
Ok
(
Result
),
Err
(
List
(
Problem
))]
Route
.
default_input
:
Input
Route
.
default_settings
:
Settings
Route
.
layout
:
Input
,
Settings
->
[
Ok
(
Result
),
Err
(
List
(
Problem
))]
Route
.
Side
: [
Top
,
Right
,
Bottom
,
Left
]
Route
.
Endpoint
: [
From
,
To
]
Route
.
Attachment
: [
Automatic
,
On
(
Side
),
Fixed
({ side :
Side
, offset :
F64
})]
Route
.
AttachmentRule
: { edge :
U64
, endpoint :
Endpoint
, attachment :
Attachment
}
Route
.
Outline
: [
Rectangle
,
Ellipse
]
Route
.
BoundaryRule
: { node :
U64
, outline :
Outline
}
Route
.
Group
: { rect :
Rect
, parent : [
Root
,
Parent
(
U64
)] }
Route
.
Membership
: { node :
U64
, group :
U64
}
Route
.
GroupAttachmentRule
: { edge :
U64
, group :
U64
, attachment :
Attachment
}
Route
.
LabelPlacement
: [
Center
,
Near
(
Endpoint
)]
Route
.
EdgeLabel
: { edge :
U64
, width :
F64
, height :
F64
, placement :
LabelPlacement
}
Route
.
SharedEndRule
: { edges :
List
(
U64
), endpoint :
Endpoint
, attachment :
Attachment
}
Route
.
WaypointRule
: { edge :
U64
, points :
List
(
Point
) }
Route
.
GuideRule
: { edge :
U64
, points :
List
(
Point
) }
Route
.
Input
: { graph : { nodes :
List
({ width :
F64
, height :
F64
}), edges :
List
({ from :
U64
, to :
U64
}) }, positions :
List
({ x :
F64
, y :
F64
}), groups :
List
(
Group
), memberships :
List
(
Membership
), attachments :
List
(
AttachmentRule
), group_attachments :
List
(
GroupAttachmentRule
), boundaries :
List
(
BoundaryRule
), edge_labels :
List
(
EdgeLabel
), shared_ends :
List
(
SharedEndRule
), waypoints :
List
(
WaypointRule
), guides :
List
(
GuideRule
) }
Route
.
Settings
: { obstacle_gap :
F64
, bend_penalty :
F64
, shared_path_penalty :
F64
, edge_gap :
F64
, max_sweeps :
U64
}
Route
.
SelectedAttachment
: { point :
Point
, side :
Side
}
Route
.
EdgeAttachments
: { from :
SelectedAttachment
, to :
SelectedAttachment
}
Route
.
GroupCrossing
: { group :
U64
, point :
Point
, side :
Side
, offset :
F64
}
Route
.
SharedRoute
: { edges :
List
(
U64
), endpoint :
Endpoint
, junction :
Point
, trunk :
Route
, group_crossings :
List
(
GroupCrossing
) }
Route
.
Result
: { layout : { positions :
List
(
Point
), routes :
List
(
Route
), bounds :
Rect
}, groups :
List
(
Rect
), label_anchors :
List
(
Point
), attachments :
List
(
EdgeAttachments
), group_crossings :
List
(
List
(
GroupCrossing
)), shared_routes :
List
(
SharedRoute
) }
Route
.
Problem
:= [
InvalidNodeWidth
(
U64
),
InvalidNodeHeight
(
U64
),
PositionCountMismatch
,
InvalidPosition
(
U64
),
InvalidEdgeFrom
(
U64
),
InvalidEdgeTo
(
U64
),
InvalidAttachmentEdge
(
U64
),
InvalidAttachmentOffset
(
U64
),
DuplicateAttachment
(
U64
),
InvalidGroupRect
(
U64
),
InvalidGroupParent
(
U64
),
InvalidMembershipNode
(
U64
),
InvalidMembershipGroup
(
U64
),
DuplicateMembership
(
U64
),
InvalidBoundaryNode
(
U64
),
DuplicateBoundary
(
U64
),
InvalidGroupAttachmentEdge
(
U64
),
InvalidGroupAttachmentGroup
(
U64
),
InvalidGroupAttachmentOffset
(
U64
),
DuplicateGroupAttachment
(
U64
),
GroupAttachmentNotBoundary
(
U64
),
InvalidLabelEdge
(
U64
),
InvalidLabelWidth
(
U64
),
InvalidLabelHeight
(
U64
),
InvalidWaypointEdge
(
U64
),
InvalidWaypoint
(
U64
),
DuplicateWaypoints
(
U64
),
BlockedWaypoint
(
U64
),
InvalidGuideEdge
(
U64
),
InvalidGuide
(
U64
),
DuplicateGuides
(
U64
),
SharedEndNeedsEdges
(
U64
),
InvalidSharedEndEdge
(
U64
),
DuplicateSharedEndEdge
(
U64
),
InvalidSharedEndAttachmentOffset
(
U64
),
SharedEndMismatch
(
U64
),
SharedEndMemberAttachment
(
U64
),
SharedEndOverlap
(
U64
),
InvalidObstacleGap
,
InvalidBendPenalty
,
InvalidSharedPathPenalty
,
InvalidEdgeGap
]
Route.Problem
.
is_eq
: _
Route.Problem
.
to_str
:
Problem
->
Str
StressLayout
.
stress_defaults
:
Settings
StressLayout
.
stress_default_run
:
RunArgs
StressLayout
.
prepare_stress
:
Spec
,
Settings
->
[
Ok
(
StressPrepared
),
Err
(
List
(
Problem
))]
StressLayout
.
place_stress
:
StressPrepared
,
RunArgs
->
{ positions :
List
({ x :
F64
, y :
F64
}), components :
List
(
U64
), convergence : { iterations :
U64
, converged :
Bool
} }
StressLayout
.
run_stress
:
StressPrepared
,
RunArgs
->
{ layout : { positions :
List
({ x :
F64
, y :
F64
}), bounds : { x :
F64
, y :
F64
, width :
F64
, height :
F64
}, routes :
List
(
Route
) }, components :
List
(
U64
), convergence : { iterations :
U64
, converged :
Bool
} }
StressLayout
.
layout_stress
:
Spec
,
Settings
,
RunArgs
->
[
Ok
({ layout : { positions :
List
({ x :
F64
, y :
F64
}), bounds : { x :
F64
, y :
F64
, width :
F64
, height :
F64
}, routes :
List
(
Route
) }, components :
List
(
U64
), convergence : { iterations :
U64
, converged :
Bool
} }),
Err
(
List
(
Problem
))]
Tree
.
default_input
:
Input
Tree
.
default_settings
:
Settings
Tree
.
default_radial_settings
:
RadialSettings
Tree
.
prepare
:
Input
,
Settings
->
[
Ok
(
Prepared
),
Err
(
List
(
Problem
))]
Tree
.
layout_prepared
:
Prepared
->
Result
Tree
.
layout
:
Input
,
Settings
->
[
Ok
(
Result
),
Err
(
List
(
Problem
))]
Tree
.
prepare_radial
:
Input
,
RadialSettings
->
[
Ok
(
RadialPrepared
),
Err
(
List
(
Problem
))]
Tree
.
layout_radial_prepared
:
RadialPrepared
->
Result
Tree
.
layout_radial
:
Input
,
RadialSettings
->
[
Ok
(
Result
),
Err
(
List
(
Problem
))]
Tree
.
Spec
:= { width :
F64
, height :
F64
, children :
List
(
Spec
) }
Tree
.
Input
:
Spec
Tree
.
Settings
: { sibling_gap :
F64
, subtree_gap :
F64
, level_gap :
F64
, direction : [
Down
,
Up
,
Left
,
Right
] }
Tree
.
RadialSettings
: { sibling_gap :
F64
, subtree_gap :
F64
, ring_gap :
F64
, start_angle :
F64
, winding : [
Clockwise
,
CounterClockwise
] }
Tree
.
Problem
: [
InvalidWidth
(
U64
),
InvalidHeight
(
U64
),
InvalidSiblingGap
,
InvalidSubtreeGap
,
InvalidLevelGap
,
InvalidRingGap
,
InvalidStartAngle
]
Tree
.
Result
: { layout : { positions :
List
({ x :
F64
, y :
F64
}), bounds : { x :
F64
, y :
F64
, width :
F64
, height :
F64
}, routes :
List
(
Route
) }, depths :
List
(
U64
) }