Expand description
Convexity checking for portgraphs.
This is based on a ConvexChecker object that is expensive to create
(linear in the size of the graph), but can be reused to check multiple
subgraphs for convexity quickly.
There are currently two implementations of the ConvexChecker trait:
TopoConvexCheckeruses a pre-computed topological node order to speed up convexity checks. This is a good default choice for most graphs.LineConvexCheckeruses a pre-computed line partition, i.e. a partition of the graph into edge disjoint paths. Convexity checks can then be performed based on the indices of the nodes in the paths. This will be faster thanTopoConvexCheckerfor convexity checking of small subgraphs (say, up to ~100 nodes), in graphs for which most nodes have few incoming and outgoing ports. Note that initializing theLineConvexCheckeris up to 4x slower than initializing theTopoConvexChecker, so must be amortized over many convexity checks.
Structs§
- Line
Convex Checker - Convexity checking using a pre-computed line partition of the graph.
- Line
Index - Index of a line in a
LineConvexChecker’ s line partition. - Line
Interval - Interval of positions on a line, [min, max] inclusive.
- Line
Intervals - Intervals of positions on each line that are occupied by a subgraph.
- Position
- Position of a node on a line in a
LineConvexChecker’ s line partition. - Topo
Convex Checker - Convexity checking using a pre-computed topological node order.
Traits§
- Convex
Checker - Pre-computed data for fast subgraph convexity checking on a given graph.
- Create
Convex Checker - Trait to create a
ConvexCheckerfor a given graph.