@mark1russell7/highways 0.4.2 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -2
- package/build/index.d.ts +799 -68
- package/build/index.d.ts.map +1 -1
- package/build/index.js +6235 -2128
- package/build/index.js.map +1 -1
- package/package.json +3 -1
- package/src/bench/exact/index.ts +197 -0
- package/src/bench/measures/index.ts +1 -0
- package/src/bench/measures/lanes.ts +304 -0
- package/src/bench/measures/levels.ts +86 -2
- package/src/bench/screen/forms.ts +11 -5
- package/src/bench/screen/measures.ts +18 -0
- package/src/bench/screen/screen.ts +28 -0
- package/src/channels.ts +56 -0
- package/src/highways/diffusion/index.ts +103 -0
- package/src/highways/edge-paths/index.ts +155 -0
- package/src/highways/fixtures.test-util.ts +71 -0
- package/src/highways/flow-clusters/index.ts +143 -0
- package/src/highways/growth/index.ts +148 -0
- package/src/highways/hdbscan/index.ts +250 -0
- package/src/highways/hough/index.ts +182 -0
- package/src/highways/hub-arcs/index.ts +181 -0
- package/src/highways/index.ts +15 -0
- package/src/highways/lanes/index.ts +189 -0
- package/src/highways/mingle/index.ts +171 -0
- package/src/highways/nested/index.ts +143 -0
- package/src/highways/ridges/index.ts +328 -0
- package/src/highways/snap.ts +110 -0
- package/src/highways/soft-keys/index.ts +114 -0
- package/src/highways/spiral/index.ts +205 -0
- package/src/highways/traclus/index.ts +296 -0
- package/src/index.ts +1 -0
- package/src/routers/shared.ts +56 -3
- package/src/strategies/builtins.ts +155 -1
- package/src/strategies/schemas.ts +180 -0
- package/src/visibility.ts +5 -0
package/README.md
CHANGED
|
@@ -150,6 +150,8 @@ These options of `shared` and `trunks` are off by default. With the defaults, th
|
|
|
150
150
|
- `passes` of `shared` sets the number of passes. After the first pass, each edge finds its way again with the ways of the other edges fixed (HWY-039).
|
|
151
151
|
- `order` of `shared` sets the order of the edges of a key: `span` (the default, the longest first), `shortest`, `load` or `input` (NAT-024).
|
|
152
152
|
- `merge: snell` of `shared` moves each merge point to the angle `acos(d)` on the run (NAT-035). It cuts the sharp merges.
|
|
153
|
+
- `reuse` of `shared`, with `passes` 2 or more, routes each edge again in each later pass. The busy links of the pass before cost less (HWY-005).
|
|
154
|
+
- `capacity` of `shared` adds a cost for each lane that does not fit in the free space across a link. `laneWidth` sets the width of a lane (HWY-016).
|
|
153
155
|
- `splitAt: gilbert` of `trunks` puts the split point where the flow cost is least, with the exponent `alpha` (EDA-030).
|
|
154
156
|
- `fan: tree` of `trunks` grows a balancing-factor tree for each group, with the factor `bf` (NAT-017). 0 gives the least ink.
|
|
155
157
|
|
|
@@ -344,7 +346,7 @@ The steps of the pipeline that vary have strategies. Each step has one interface
|
|
|
344
346
|
|---|---|---|---|
|
|
345
347
|
| `group` | `Graph` | `Section`: the tree of groups of the router `sections` | `quadtree`, `keys`, `kd`, `cut` |
|
|
346
348
|
| `router` | `Graph` | `Result` | `straight`, `plugs`, `corners`, `corners-smooth`, `trunks`, `shared`, `shared-all`, `sections`, `sections-tree` |
|
|
347
|
-
| `highway` | `HighwayInput`: the graph, optionally the first routes of a router, and optionally the plan before an edit | `HighwayPlan`: the highways as data | `keys`, `shared-ways`, `corridors`, `meet`, `weiszfeld`, `stubs`, `zipper`, `level-links`, `quickbundles`, `road-classes`, `flow-field`, `wspd`, `od-cells`, `select`, `corridors+breakeven`, `corridors+stretch`, `corridors+ambiguity`, `corridors+hysteresis`, `corridors+ids` |
|
|
349
|
+
| `highway` | `HighwayInput`: the graph, optionally the first routes of a router, and optionally the plan before an edit | `HighwayPlan`: the highways as data | `keys`, `shared-ways`, `corridors`, `meet`, `weiszfeld`, `stubs`, `zipper`, `level-links`, `quickbundles`, `road-classes`, `flow-field`, `wspd`, `od-cells`, `select`, `mingle`, `spiral`, `flow-clusters`, `traclus`, `diffusion`, `nested`, `lanes`, `growth`, `edge-paths`, `soft-keys`, `hough`, `ridges`, `hdbscan`, `hub-arcs`, `corridors+breakeven`, `corridors+stretch`, `corridors+ambiguity`, `corridors+hysteresis`, `corridors+ids` |
|
|
348
350
|
| `curve` | `CurveInput`: the points, the normals of the plugs, the free space and the lane on its board | `CurveSegment[]` | `straight`, `rounded`, `spline`, `arc`, `smooth`, `clothoid`, `highway` |
|
|
349
351
|
| `room` | `RoomInput`: the boxes and the links of a board, and the tree of sections for `levels` | `Gap[]` | `routes`, `lines`, `levels` |
|
|
350
352
|
|
|
@@ -384,9 +386,23 @@ The step `highway` decides which edges share a way. It gives a plan, not routes.
|
|
|
384
386
|
| `wspd` | The well-separated pairs of HWY-018. The edges between the two sets of one pair share one highway. |
|
|
385
387
|
| `od-cells` | The origin and destination cells of EDA-033. The edges between two cells of a zoom level share one trunk. |
|
|
386
388
|
| `select` | The candidate selection of HWY-045. Some strategies propose highways, and a greedy pass with swaps keeps the best set. |
|
|
389
|
+
| `mingle` | The agglomerative bundles of HWY-003 (MINGLE). Two bundles that are near in 4D merge when the merge saves ink. |
|
|
390
|
+
| `spiral` | The spiral trees of HWY-017 and EDA-035. The edges of a hub with many targets share the branches of one tree of spirals. |
|
|
391
|
+
| `flow-clusters` | The end point clusters of HWY-023. A hierarchical clustering puts the edges with near ends in 4D into one highway. |
|
|
392
|
+
| `traclus` | The segment clusters of HWY-025 (TRACLUS). The near segments of the first routes make clusters, and each cluster gives its mean line. |
|
|
393
|
+
| `diffusion` | The route-aware bundling of HWY-020. The use of each link spreads to the links next to it, and dense links cost less. |
|
|
394
|
+
| `nested` | The nested levels of HWY-052. Each level puts the edges of each cluster of the level above in finer clusters. The option `level` selects the plan. |
|
|
395
|
+
| `lanes` | The lanes and the capacity of HWY-051. A highway that does not fit in its channels splits into two highways by lane order. |
|
|
396
|
+
| `growth` | The local growth of HWY-055. Each edge, the longest first, joins the highway with the largest saving, or starts a highway. |
|
|
397
|
+
| `edge-paths` | The edge-path bundling of HWY-012. An edge with a short path of other edges follows their ways. |
|
|
398
|
+
| `soft-keys` | The soft keys of HWY-019. The key of an edge adds a distance, so near edges of two keys can share a highway. |
|
|
399
|
+
| `hough` | The Hough votes of HWY-024. The straight lines of the edges vote for corridors, and each peak becomes a highway. |
|
|
400
|
+
| `ridges` | The density ridges of HWY-032. The ridges of the blurred density of the edges become highways. |
|
|
401
|
+
| `hdbscan` | The density clusters of HWY-028 (HDBSCAN). The clusters of edges that live over a long range of densities become highways. |
|
|
402
|
+
| `hub-arcs` | The hub arc location of HWY-042. A greedy pass with swaps chooses at most `q` arcs, and each edge rides its best arc. |
|
|
387
403
|
|
|
388
404
|
The strategy `corridors` joins two ways when they share a long length. The length is `BREAK_EVEN` times the lane width or more, and the share `rho` of the shorter way or more.
|
|
389
|
-
The strategies `meet`, `weiszfeld`, `stubs`, `zipper
|
|
405
|
+
The strategies `meet`, `weiszfeld`, `stubs`, `zipper`, `level-links` and `lanes` change the plan of the option `from`: `shared-ways` (the default), `corridors` or `none`.
|
|
390
406
|
The routers `trunks` and `shared` keep their own code. A test pins their output, so the strategies `keys` and `shared-ways` read the same decision.
|
|
391
407
|
|
|
392
408
|
A gate keeps, drops or changes the highways of a plan. `gateStrategy(strategy, gate)` puts a gate after a highway strategy, with the name `<strategy>+<gate>`.
|