@mark1russell7/highways 0.4.2 → 0.5.1
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 +59 -2
- package/build/index.d.ts +2333 -193
- package/build/index.d.ts.map +1 -1
- package/build/index.js +13042 -2334
- package/build/index.js.map +1 -1
- package/package.json +12 -1
- package/src/bench/exact/index.ts +258 -0
- package/src/bench/exact/optima-exact-v1-bounds.json +14409 -0
- package/src/bench/exact/optima-exact-v1.json +4809 -0
- package/src/bench/exact/solve.ts +129 -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/activation.ts +3 -0
- package/src/bench/screen/bounds.ts +140 -0
- package/src/bench/screen/compare.ts +26 -0
- package/src/bench/screen/exact-set.ts +100 -0
- package/src/bench/screen/exercise.ts +290 -0
- package/src/bench/screen/forms.ts +25 -5
- package/src/bench/screen/gap.ts +316 -0
- package/src/bench/screen/hash.ts +7 -76
- package/src/bench/screen/index.ts +6 -0
- package/src/bench/screen/measures.ts +89 -1
- package/src/bench/screen/portfolio-pick.ts +20 -0
- package/src/bench/screen/screen.ts +78 -2
- package/src/bench/screen/set.ts +3 -2
- package/src/channels.ts +56 -0
- package/src/highways/areas/index.ts +160 -0
- package/src/highways/confluent/index.ts +154 -0
- package/src/highways/confluent/k23.test-util.ts +8 -0
- package/src/highways/consensus/index.ts +129 -0
- package/src/highways/crossbars/index.ts +184 -0
- package/src/highways/cubu/index.ts +26 -0
- package/src/highways/diffusion/index.ts +103 -0
- package/src/highways/divided/index.ts +111 -0
- package/src/highways/edge-paths/index.ts +155 -0
- package/src/highways/fdeb/index.ts +193 -0
- package/src/highways/fixtures.test-util.ts +71 -0
- package/src/highways/flow-clusters/index.ts +143 -0
- package/src/highways/frechet/index.ts +232 -0
- package/src/highways/growth/index.ts +148 -0
- package/src/highways/hdbscan/index.ts +250 -0
- package/src/highways/hierarchy/index.ts +140 -0
- package/src/highways/hough/index.ts +182 -0
- package/src/highways/hub-arcs/index.ts +181 -0
- package/src/highways/index.ts +79 -0
- package/src/highways/kdeeb/index.ts +355 -0
- package/src/highways/lanes/index.ts +189 -0
- package/src/highways/link-communities/index.ts +189 -0
- package/src/highways/mesh/index.ts +209 -0
- package/src/highways/mingle/index.ts +171 -0
- package/src/highways/mlseb/index.ts +204 -0
- package/src/highways/nested/index.ts +143 -0
- package/src/highways/p-hub/index.ts +248 -0
- package/src/highways/power/index.ts +117 -0
- package/src/highways/resistance/index.ts +159 -0
- package/src/highways/ridges/index.ts +328 -0
- package/src/highways/sbeb/index.ts +303 -0
- package/src/highways/scale-space/index.ts +135 -0
- package/src/highways/snap.ts +110 -0
- package/src/highways/soft-keys/index.ts +114 -0
- package/src/highways/spectral/index.ts +391 -0
- package/src/highways/spiral/index.ts +205 -0
- package/src/highways/territories/index.ts +150 -0
- package/src/highways/trace.ts +153 -0
- package/src/highways/traclus/index.ts +296 -0
- package/src/index.ts +2 -0
- package/src/portfolio/bands.ts +33 -0
- package/src/portfolio/fit.ts +29 -0
- package/src/portfolio/index.ts +6 -0
- package/src/portfolio/key.ts +98 -0
- package/src/portfolio/members.ts +171 -0
- package/src/portfolio/router.ts +133 -0
- package/src/portfolio/sets.ts +28 -0
- package/src/routers/shared.ts +56 -3
- package/src/strategies/builtins.ts +376 -1
- package/src/strategies/schemas.ts +460 -1
- package/src/visibility.ts +5 -0
|
@@ -18,17 +18,51 @@ import { hysteresisGate, type HysteresisOptions } from "../highways/gates/hyster
|
|
|
18
18
|
import { stableIdGate, type StableIdOptions } from "../highways/gates/ids/index.ts";
|
|
19
19
|
import { gateStrategy } from "../highways/gates/model.ts";
|
|
20
20
|
import { stretchGate, type StretchOptions } from "../highways/gates/stretch/index.ts";
|
|
21
|
+
import { DIFFUSION_DEFAULTS, diffusionPlan, type DiffusionOptions } from "../highways/diffusion/index.ts";
|
|
22
|
+
import { FLOW_CLUSTER_DEFAULTS, flowClusterPlan, type FlowClusterOptions } from "../highways/flow-clusters/index.ts";
|
|
23
|
+
import { EDGE_PATH_DEFAULTS, edgePathPlan, type EdgePathOptions } from "../highways/edge-paths/index.ts";
|
|
24
|
+
import { HDBSCAN_DEFAULTS, hdbscanPlan, type HdbscanOptions } from "../highways/hdbscan/index.ts";
|
|
25
|
+
import { HOUGH_DEFAULTS, houghPlan, type HoughOptions } from "../highways/hough/index.ts";
|
|
26
|
+
import { HUB_ARC_DEFAULTS, hubArcPlan, type HubArcOptions } from "../highways/hub-arcs/index.ts";
|
|
27
|
+
import { DIVIDED_DEFAULTS, dividedPlan, type DividedOptions } from "../highways/divided/index.ts";
|
|
28
|
+
import { HIERARCHY_DEFAULTS, hierarchyPlan, type HierarchyOptions } from "../highways/hierarchy/index.ts";
|
|
29
|
+
import { FDEB_DEFAULTS, fdebPlan, type FdebOptions } from "../highways/fdeb/index.ts";
|
|
30
|
+
import { MESH_DEFAULTS, meshPlan, type MeshOptions } from "../highways/mesh/index.ts";
|
|
31
|
+
import { KDEEB_DEFAULTS, kdeebPlan, type KdeebOptions } from "../highways/kdeeb/index.ts";
|
|
32
|
+
import { CUBU_DEFAULTS, cubuPlan, type CubuOptions } from "../highways/cubu/index.ts";
|
|
33
|
+
import { MLSEB_DEFAULTS, mlsebPlan, type MlsebOptions } from "../highways/mlseb/index.ts";
|
|
34
|
+
import { SBEB_DEFAULTS, sbebPlan, type SbebOptions } from "../highways/sbeb/index.ts";
|
|
35
|
+
import { AREA_DEFAULTS, areaPlan, type AreaOptions } from "../highways/areas/index.ts";
|
|
36
|
+
import { CONFLUENT_DEFAULTS, confluentPlan, type ConfluentOptions } from "../highways/confluent/index.ts";
|
|
37
|
+
import { POWER_DEFAULTS, powerPlan, type PowerOptions } from "../highways/power/index.ts";
|
|
38
|
+
import { CROSSBAR_DEFAULTS, crossbarPlan, type CrossbarOptions } from "../highways/crossbars/index.ts";
|
|
39
|
+
import { FRECHET_DEFAULTS, frechetPlan, type FrechetOptions } from "../highways/frechet/index.ts";
|
|
40
|
+
import { SPECTRAL_DEFAULTS, spectralPlan, type SpectralOptions } from "../highways/spectral/index.ts";
|
|
41
|
+
import { RESISTANCE_DEFAULTS, resistancePlan, type ResistanceOptions } from "../highways/resistance/index.ts";
|
|
42
|
+
import { LINK_COMMUNITY_DEFAULTS, linkCommunityPlan, type LinkCommunityOptions } from "../highways/link-communities/index.ts";
|
|
43
|
+
import { TERRITORY_DEFAULTS, territoryPlan, type TerritoryOptions } from "../highways/territories/index.ts";
|
|
44
|
+
import { CONSENSUS_DEFAULTS, consensusPlan, type ConsensusOptions } from "../highways/consensus/index.ts";
|
|
45
|
+
import { P_HUB_DEFAULTS, pHubPlan, type PHubOptions } from "../highways/p-hub/index.ts";
|
|
46
|
+
import { SCALE_SPACE_DEFAULTS, scaleSpacePlan, type ScaleSpaceOptions } from "../highways/scale-space/index.ts";
|
|
47
|
+
import { RIDGE_DEFAULTS, ridgePlan, type RidgeOptions } from "../highways/ridges/index.ts";
|
|
48
|
+
import { SOFT_KEY_DEFAULTS, softKeyPlan, type SoftKeyOptions } from "../highways/soft-keys/index.ts";
|
|
21
49
|
import { FLOW_FIELD_DEFAULTS, flowFieldPlan, type FlowFieldOptions } from "../highways/flow-field/index.ts";
|
|
22
50
|
import { keysPlan, type KeysOptions } from "../highways/keys/index.ts";
|
|
23
51
|
import { LEVEL_HIGHWAY_DEFAULTS, levelHighwayPlan, type LevelHighwayOptions } from "../highways/level-links/index.ts";
|
|
24
52
|
import { MEET_DEFAULTS, meetPlan, type MeetOptions } from "../highways/meet/index.ts";
|
|
53
|
+
import { MINGLE_DEFAULTS, minglePlan, type MingleOptions } from "../highways/mingle/index.ts";
|
|
25
54
|
import type { HighwayInput } from "../highways/model.ts";
|
|
26
55
|
import { OD_CELL_DEFAULTS, odCellPlan, type OdCellOptions } from "../highways/od-cells/index.ts";
|
|
27
56
|
import { QUICKBUNDLES_DEFAULTS, quickBundlesPlan, type QuickBundlesOptions } from "../highways/quickbundles/index.ts";
|
|
57
|
+
import { NESTED_DEFAULTS, nestedPlan, type NestedOptions } from "../highways/nested/index.ts";
|
|
58
|
+
import { LANES_DEFAULTS, lanesPlan, type LanesOptions } from "../highways/lanes/index.ts";
|
|
59
|
+
import { GROWTH_DEFAULTS, growthPlan, type GrowthOptions } from "../highways/growth/index.ts";
|
|
28
60
|
import { ROAD_CLASS_DEFAULTS, roadClassPlan, type RoadClassOptions } from "../highways/road-classes/index.ts";
|
|
29
61
|
import { SELECT_DEFAULTS, selectPlan, type SelectOptions } from "../highways/select/index.ts";
|
|
30
62
|
import { sharedWaysPlan, type SharedWaysOptions } from "../highways/shared-ways/index.ts";
|
|
63
|
+
import { SPIRAL_DEFAULTS, spiralPlan, type SpiralOptions } from "../highways/spiral/index.ts";
|
|
31
64
|
import { STUB_DEFAULTS, stubPlan, type StubOptions } from "../highways/stubs/index.ts";
|
|
65
|
+
import { TRACLUS_DEFAULTS, traclusPlan, type TraclusOptions } from "../highways/traclus/index.ts";
|
|
32
66
|
import { WEISZFELD_DEFAULTS, weiszfeldPlan, type WeiszfeldOptions } from "../highways/weiszfeld/index.ts";
|
|
33
67
|
import { WSPD_DEFAULTS, wspdPlan, type WspdOptions } from "../highways/wspd/index.ts";
|
|
34
68
|
import { ZIPPER_DEFAULTS, zipperPlan, type ZipperOptions } from "../highways/zipper/index.ts";
|
|
@@ -44,7 +78,8 @@ import { byCollection, trunksRouter, type TrunksOptions } from "../routers/trunk
|
|
|
44
78
|
import { buildSections, SECTION_DEFAULTS, type SectionOptions } from "../sections.ts";
|
|
45
79
|
import { createRegistry, defineStrategy, type AnyStrategy, type CurveInput, type LaneBoard, type Registry, type Strategy } from "./model.ts";
|
|
46
80
|
import type { OptionSchema } from "./options.ts";
|
|
47
|
-
import {
|
|
81
|
+
import { AREA_SCHEMA, CONFLUENT_SCHEMA, CROSSBAR_SCHEMA, FRECHET_SCHEMA, MLSEB_SCHEMA, POWER_SCHEMA, SBEB_SCHEMA } from "./schemas.ts";
|
|
82
|
+
import { CLOTHOID_SCHEMA, CORNERS_SCHEMA, CORRIDOR_SCHEMA, CONSENSUS_SCHEMA, CUBU_SCHEMA, CUT_SCHEMA, DIFFUSION_SCHEMA, DIVIDED_SCHEMA, EDGE_PATH_SCHEMA, FDEB_SCHEMA, FLOW_CLUSTER_SCHEMA, FLOW_FIELD_SCHEMA, GROWTH_SCHEMA, HDBSCAN_SCHEMA, HIERARCHY_SCHEMA, HIGHWAY_SCHEMA, HOUGH_SCHEMA, HUB_ARC_SCHEMA, KD_SCHEMA, KDEEB_SCHEMA, KEY_SCHEMA, LANES_SCHEMA, LEVEL_HIGHWAY_SCHEMA, LEVEL_ROOM_SCHEMA, LINK_COMMUNITY_SCHEMA, MEET_SCHEMA, MESH_SCHEMA, MINGLE_SCHEMA, NESTED_SCHEMA, OD_CELL_SCHEMA, P_HUB_SCHEMA, QUICKBUNDLES_SCHEMA, RADIUS_SCHEMA, RESISTANCE_SCHEMA, RIDGE_SCHEMA, ROAD_CLASS_SCHEMA, ROOM_SCHEMA, SCALE_SPACE_SCHEMA, SECTION_SCHEMA, SELECT_SCHEMA, SECTIONS_SCHEMA, SHARED_SCHEMA, SMOOTH_SCHEMA, SOFT_KEY_SCHEMA, SPECTRAL_SCHEMA, SPIRAL_SCHEMA, STUB_SCHEMA, TENSION_SCHEMA, TERRITORY_SCHEMA, TRACLUS_SCHEMA, TRUNKS_SCHEMA, WEISZFELD_SCHEMA, WSPD_SCHEMA, ZIPPER_SCHEMA } from "./schemas.ts";
|
|
48
83
|
|
|
49
84
|
/** The options of a router strategy: the options of its router, without the name and the limit of the benchmark. */
|
|
50
85
|
export type RouterPreset<O> = Omit<O, "name" | "maxNodes">;
|
|
@@ -389,6 +424,40 @@ export const highwayStrategies: {
|
|
|
389
424
|
readonly wspd: Strategy<"highway", WspdOptions>;
|
|
390
425
|
readonly "od-cells": Strategy<"highway", OdCellOptions>;
|
|
391
426
|
readonly select: Strategy<"highway", SelectOptions>;
|
|
427
|
+
readonly mingle: Strategy<"highway", MingleOptions>;
|
|
428
|
+
readonly spiral: Strategy<"highway", SpiralOptions>;
|
|
429
|
+
readonly "flow-clusters": Strategy<"highway", FlowClusterOptions>;
|
|
430
|
+
readonly traclus: Strategy<"highway", TraclusOptions>;
|
|
431
|
+
readonly diffusion: Strategy<"highway", DiffusionOptions>;
|
|
432
|
+
readonly nested: Strategy<"highway", NestedOptions>;
|
|
433
|
+
readonly lanes: Strategy<"highway", LanesOptions>;
|
|
434
|
+
readonly growth: Strategy<"highway", GrowthOptions>;
|
|
435
|
+
readonly "edge-paths": Strategy<"highway", EdgePathOptions>;
|
|
436
|
+
readonly "soft-keys": Strategy<"highway", SoftKeyOptions>;
|
|
437
|
+
readonly hough: Strategy<"highway", HoughOptions>;
|
|
438
|
+
readonly ridges: Strategy<"highway", RidgeOptions>;
|
|
439
|
+
readonly hdbscan: Strategy<"highway", HdbscanOptions>;
|
|
440
|
+
readonly "hub-arcs": Strategy<"highway", HubArcOptions>;
|
|
441
|
+
readonly divided: Strategy<"highway", DividedOptions>;
|
|
442
|
+
readonly hierarchy: Strategy<"highway", HierarchyOptions>;
|
|
443
|
+
readonly fdeb: Strategy<"highway", FdebOptions>;
|
|
444
|
+
readonly mesh: Strategy<"highway", MeshOptions>;
|
|
445
|
+
readonly kdeeb: Strategy<"highway", KdeebOptions>;
|
|
446
|
+
readonly cubu: Strategy<"highway", CubuOptions>;
|
|
447
|
+
readonly mlseb: Strategy<"highway", MlsebOptions>;
|
|
448
|
+
readonly sbeb: Strategy<"highway", SbebOptions>;
|
|
449
|
+
readonly areas: Strategy<"highway", AreaOptions>;
|
|
450
|
+
readonly confluent: Strategy<"highway", ConfluentOptions>;
|
|
451
|
+
readonly power: Strategy<"highway", PowerOptions>;
|
|
452
|
+
readonly crossbars: Strategy<"highway", CrossbarOptions>;
|
|
453
|
+
readonly frechet: Strategy<"highway", FrechetOptions>;
|
|
454
|
+
readonly spectral: Strategy<"highway", SpectralOptions>;
|
|
455
|
+
readonly resistance: Strategy<"highway", ResistanceOptions>;
|
|
456
|
+
readonly "link-communities": Strategy<"highway", LinkCommunityOptions>;
|
|
457
|
+
readonly territories: Strategy<"highway", TerritoryOptions>;
|
|
458
|
+
readonly consensus: Strategy<"highway", ConsensusOptions>;
|
|
459
|
+
readonly "p-hub": Strategy<"highway", PHubOptions>;
|
|
460
|
+
readonly "scale-space": Strategy<"highway", ScaleSpaceOptions>;
|
|
392
461
|
readonly "corridors+breakeven": Strategy<"highway", CorridorOptions & BreakEvenOptions>;
|
|
393
462
|
readonly "corridors+stretch": Strategy<"highway", CorridorOptions & StretchOptions>;
|
|
394
463
|
readonly "corridors+ambiguity": Strategy<"highway", CorridorOptions & AmbiguityGuardOptions>;
|
|
@@ -513,6 +582,312 @@ export const highwayStrategies: {
|
|
|
513
582
|
maxNodes: 10_000,
|
|
514
583
|
run: (input: HighwayInput, o: Readonly<SelectOptions>) => selectPlan(input, o),
|
|
515
584
|
}),
|
|
585
|
+
mingle: defineStrategy({
|
|
586
|
+
step: "highway",
|
|
587
|
+
name: "mingle",
|
|
588
|
+
describe: "MINGLE (HWY-003). Edges are points in 4D. Near bundles merge level by level while the merge saves ink, and each bundle gets one trunk.",
|
|
589
|
+
defaults: { ...MINGLE_DEFAULTS } as MingleOptions,
|
|
590
|
+
schema: MINGLE_SCHEMA,
|
|
591
|
+
maxNodes: 10_000,
|
|
592
|
+
run: (input: HighwayInput, o: Readonly<MingleOptions>) => minglePlan(input, o),
|
|
593
|
+
}),
|
|
594
|
+
spiral: defineStrategy({
|
|
595
|
+
step: "highway",
|
|
596
|
+
name: "spiral",
|
|
597
|
+
describe: "Spiral trees (HWY-017, EDA-035). The edges of a node with many edges branch on arcs of spirals, and each branch with two edges is a highway.",
|
|
598
|
+
defaults: { ...SPIRAL_DEFAULTS } as SpiralOptions,
|
|
599
|
+
schema: SPIRAL_SCHEMA,
|
|
600
|
+
maxNodes: 10_000,
|
|
601
|
+
run: (input: HighwayInput, o: Readonly<SpiralOptions>) => spiralPlan(input, o),
|
|
602
|
+
}),
|
|
603
|
+
"flow-clusters": defineStrategy({
|
|
604
|
+
step: "highway",
|
|
605
|
+
name: "flow-clusters",
|
|
606
|
+
describe: "Flow clusters (HWY-023). A hierarchical clustering puts the edges with near sources and near targets together, and each cluster gets highways.",
|
|
607
|
+
defaults: { ...FLOW_CLUSTER_DEFAULTS } as FlowClusterOptions,
|
|
608
|
+
schema: FLOW_CLUSTER_SCHEMA,
|
|
609
|
+
maxNodes: 10_000,
|
|
610
|
+
run: (input: HighwayInput, o: Readonly<FlowClusterOptions>) => flowClusterPlan(input, o),
|
|
611
|
+
}),
|
|
612
|
+
traclus: defineStrategy({
|
|
613
|
+
step: "highway",
|
|
614
|
+
name: "traclus",
|
|
615
|
+
describe: "TRACLUS (HWY-025). The first routes break into segments, and the dense clusters of near segments become highways.",
|
|
616
|
+
defaults: { ...TRACLUS_DEFAULTS } as TraclusOptions,
|
|
617
|
+
schema: TRACLUS_SCHEMA,
|
|
618
|
+
maxNodes: 10_000,
|
|
619
|
+
run: (input: HighwayInput, o: Readonly<TraclusOptions>) => traclusPlan(input, o),
|
|
620
|
+
}),
|
|
621
|
+
diffusion: defineStrategy({
|
|
622
|
+
step: "highway",
|
|
623
|
+
name: "diffusion",
|
|
624
|
+
describe: "Route-aware bundling (HWY-020). The density of the first ways diffuses on the corner graph, and dense links cost less in a second pass.",
|
|
625
|
+
defaults: { ...DIFFUSION_DEFAULTS } as DiffusionOptions,
|
|
626
|
+
schema: DIFFUSION_SCHEMA,
|
|
627
|
+
maxNodes: 10_000,
|
|
628
|
+
run: (input: HighwayInput, o: Readonly<DiffusionOptions>) => diffusionPlan(input, o),
|
|
629
|
+
}),
|
|
630
|
+
nested: defineStrategy({
|
|
631
|
+
step: "highway",
|
|
632
|
+
name: "nested",
|
|
633
|
+
describe: "Highways for each zoom level that nest (HWY-052). Each level puts the edges of each cluster of the level above in finer clusters.",
|
|
634
|
+
defaults: { ...NESTED_DEFAULTS } as NestedOptions,
|
|
635
|
+
schema: NESTED_SCHEMA,
|
|
636
|
+
maxNodes: 10_000,
|
|
637
|
+
run: (input: HighwayInput, o: Readonly<NestedOptions>) => nestedPlan(input, o),
|
|
638
|
+
}),
|
|
639
|
+
lanes: defineStrategy({
|
|
640
|
+
step: "highway",
|
|
641
|
+
name: "lanes",
|
|
642
|
+
describe: "Width, lanes and capacity (HWY-051). A highway that does not fit in its channels splits into two highways by lane order.",
|
|
643
|
+
defaults: { ...LANES_DEFAULTS } as LanesOptions,
|
|
644
|
+
schema: LANES_SCHEMA,
|
|
645
|
+
maxNodes: 10_000,
|
|
646
|
+
run: (input: HighwayInput, o: Readonly<LanesOptions>) => lanesPlan(input, o),
|
|
647
|
+
}),
|
|
648
|
+
growth: defineStrategy({
|
|
649
|
+
step: "highway",
|
|
650
|
+
name: "growth",
|
|
651
|
+
describe: "Local growth (HWY-055). Each edge, the longest first, joins the highway with the largest saving, or starts a highway.",
|
|
652
|
+
defaults: { ...GROWTH_DEFAULTS } as GrowthOptions,
|
|
653
|
+
schema: GROWTH_SCHEMA,
|
|
654
|
+
maxNodes: 10_000,
|
|
655
|
+
run: (input: HighwayInput, o: Readonly<GrowthOptions>) => growthPlan(input, o),
|
|
656
|
+
}),
|
|
657
|
+
"edge-paths": defineStrategy({
|
|
658
|
+
step: "highway",
|
|
659
|
+
name: "edge-paths",
|
|
660
|
+
describe: "Edge-path bundling (HWY-012). An edge with a short path of other edges follows their ways, and the shared stretches become highways.",
|
|
661
|
+
defaults: { ...EDGE_PATH_DEFAULTS } as EdgePathOptions,
|
|
662
|
+
schema: EDGE_PATH_SCHEMA,
|
|
663
|
+
maxNodes: 10_000,
|
|
664
|
+
run: (input: HighwayInput, o: Readonly<EdgePathOptions>) => edgePathPlan(input, o),
|
|
665
|
+
}),
|
|
666
|
+
"soft-keys": defineStrategy({
|
|
667
|
+
step: "highway",
|
|
668
|
+
name: "soft-keys",
|
|
669
|
+
describe: "Soft keys (HWY-019). The key of an edge adds a distance to the flow distance, and a hierarchical clustering makes the highways.",
|
|
670
|
+
defaults: { ...SOFT_KEY_DEFAULTS } as SoftKeyOptions,
|
|
671
|
+
schema: SOFT_KEY_SCHEMA,
|
|
672
|
+
maxNodes: 10_000,
|
|
673
|
+
run: (input: HighwayInput, o: Readonly<SoftKeyOptions>) => softKeyPlan(input, o),
|
|
674
|
+
}),
|
|
675
|
+
hough: defineStrategy({
|
|
676
|
+
step: "highway",
|
|
677
|
+
name: "hough",
|
|
678
|
+
describe: "Hough votes (HWY-024). The straight lines of the edges vote for corridors, and each peak of the votes becomes a highway.",
|
|
679
|
+
defaults: { ...HOUGH_DEFAULTS } as HoughOptions,
|
|
680
|
+
schema: HOUGH_SCHEMA,
|
|
681
|
+
maxNodes: 10_000,
|
|
682
|
+
run: (input: HighwayInput, o: Readonly<HoughOptions>) => houghPlan(input, o),
|
|
683
|
+
}),
|
|
684
|
+
ridges: defineStrategy({
|
|
685
|
+
step: "highway",
|
|
686
|
+
name: "ridges",
|
|
687
|
+
describe: "Ridges of the line density (HWY-032). The ridges of the blurred density of the edges become highways, and near edges snap to them.",
|
|
688
|
+
defaults: { ...RIDGE_DEFAULTS } as RidgeOptions,
|
|
689
|
+
schema: RIDGE_SCHEMA,
|
|
690
|
+
maxNodes: 10_000,
|
|
691
|
+
run: (input: HighwayInput, o: Readonly<RidgeOptions>) => ridgePlan(input, o),
|
|
692
|
+
}),
|
|
693
|
+
hdbscan: defineStrategy({
|
|
694
|
+
step: "highway",
|
|
695
|
+
name: "hdbscan",
|
|
696
|
+
describe: "HDBSCAN on edges (HWY-028). The density clusters of the edges that live over a long range become highways.",
|
|
697
|
+
defaults: { ...HDBSCAN_DEFAULTS } as HdbscanOptions,
|
|
698
|
+
schema: HDBSCAN_SCHEMA,
|
|
699
|
+
maxNodes: 10_000,
|
|
700
|
+
run: (input: HighwayInput, o: Readonly<HdbscanOptions>) => hdbscanPlan(input, o),
|
|
701
|
+
}),
|
|
702
|
+
"hub-arcs": defineStrategy({
|
|
703
|
+
step: "highway",
|
|
704
|
+
name: "hub-arcs",
|
|
705
|
+
describe: "Hub arc location (HWY-042). A greedy pass with swaps chooses at most q arcs from the candidates, and each edge rides its best arc.",
|
|
706
|
+
defaults: { ...HUB_ARC_DEFAULTS } as HubArcOptions,
|
|
707
|
+
schema: HUB_ARC_SCHEMA,
|
|
708
|
+
maxNodes: 10_000,
|
|
709
|
+
run: (input: HighwayInput, o: Readonly<HubArcOptions>) => hubArcPlan(input, o),
|
|
710
|
+
}),
|
|
711
|
+
divided: defineStrategy({
|
|
712
|
+
step: "highway",
|
|
713
|
+
name: "divided",
|
|
714
|
+
describe: "Divided edge bundling (HWY-011). Each highway of two-way traffic splits into two carriageways at an offset, one for each direction.",
|
|
715
|
+
defaults: { ...DIVIDED_DEFAULTS } as DividedOptions,
|
|
716
|
+
schema: DIVIDED_SCHEMA,
|
|
717
|
+
maxNodes: 10_000,
|
|
718
|
+
run: (input: HighwayInput, o: Readonly<DividedOptions>) => dividedPlan(input, o),
|
|
719
|
+
}),
|
|
720
|
+
hierarchy: defineStrategy({
|
|
721
|
+
step: "highway",
|
|
722
|
+
name: "hierarchy",
|
|
723
|
+
describe: "Hierarchical edge bundling (HWY-001). Each edge goes near the hubs of the sections between its two leaves, and the shared stretches become highways.",
|
|
724
|
+
defaults: { ...HIERARCHY_DEFAULTS } as HierarchyOptions,
|
|
725
|
+
schema: HIERARCHY_SCHEMA,
|
|
726
|
+
maxNodes: 10_000,
|
|
727
|
+
run: (input: HighwayInput, o: Readonly<HierarchyOptions>) => hierarchyPlan(input, o),
|
|
728
|
+
}),
|
|
729
|
+
fdeb: defineStrategy({
|
|
730
|
+
step: "highway",
|
|
731
|
+
name: "fdeb",
|
|
732
|
+
describe: "Force-directed edge bundling with a field of the boxes (HWY-002 with RULE-002). The bundled points snap back to legal ways.",
|
|
733
|
+
defaults: { ...FDEB_DEFAULTS } as FdebOptions,
|
|
734
|
+
schema: FDEB_SCHEMA,
|
|
735
|
+
maxNodes: 10_000,
|
|
736
|
+
run: (input: HighwayInput, o: Readonly<FdebOptions>) => fdebPlan(input, o),
|
|
737
|
+
}),
|
|
738
|
+
mesh: defineStrategy({
|
|
739
|
+
step: "highway",
|
|
740
|
+
name: "mesh",
|
|
741
|
+
describe: "A control mesh (HWY-004). The crossings of the edges with the mesh form clusters, and the edges of a cluster share its point.",
|
|
742
|
+
defaults: { ...MESH_DEFAULTS } as MeshOptions,
|
|
743
|
+
schema: MESH_SCHEMA,
|
|
744
|
+
maxNodes: 10_000,
|
|
745
|
+
run: (input: HighwayInput, o: Readonly<MeshOptions>) => meshPlan(input, o),
|
|
746
|
+
}),
|
|
747
|
+
kdeeb: defineStrategy({
|
|
748
|
+
step: "highway",
|
|
749
|
+
name: "kdeeb",
|
|
750
|
+
describe: "Density bundling with a mask of the free space (RULE-028 with HWY-006). The edges move up the density, and the ridges become highways.",
|
|
751
|
+
defaults: { ...KDEEB_DEFAULTS } as KdeebOptions,
|
|
752
|
+
schema: KDEEB_SCHEMA,
|
|
753
|
+
maxNodes: 10_000,
|
|
754
|
+
run: (input: HighwayInput, o: Readonly<KdeebOptions>) => kdeebPlan(input, o),
|
|
755
|
+
}),
|
|
756
|
+
cubu: defineStrategy({
|
|
757
|
+
step: "highway",
|
|
758
|
+
name: "cubu",
|
|
759
|
+
describe: "Fast density bundling (HWY-007). The steps of `kdeeb` with a separable blur or a Fourier transform of the counts of the cells.",
|
|
760
|
+
defaults: { ...CUBU_DEFAULTS } as CubuOptions,
|
|
761
|
+
schema: CUBU_SCHEMA,
|
|
762
|
+
maxNodes: 10_000,
|
|
763
|
+
run: (input: HighwayInput, o: Readonly<CubuOptions>) => cubuPlan(input, o),
|
|
764
|
+
}),
|
|
765
|
+
mlseb: defineStrategy({
|
|
766
|
+
step: "highway",
|
|
767
|
+
name: "mlseb",
|
|
768
|
+
describe: "Moving least squares bundling (HWY-008). Each point of an edge moves to a local fit of the near edges, and the bundled points snap back to legal ways.",
|
|
769
|
+
defaults: { ...MLSEB_DEFAULTS } as MlsebOptions,
|
|
770
|
+
schema: MLSEB_SCHEMA,
|
|
771
|
+
maxNodes: 10_000,
|
|
772
|
+
run: (input: HighwayInput, o: Readonly<MlsebOptions>) => mlsebPlan(input, o),
|
|
773
|
+
}),
|
|
774
|
+
sbeb: defineStrategy({
|
|
775
|
+
step: "highway",
|
|
776
|
+
name: "sbeb",
|
|
777
|
+
describe: "Skeleton-based edge bundling (HWY-009). The edges of a group move toward the skeleton of their shape, and the bundled points snap back to legal ways.",
|
|
778
|
+
defaults: { ...SBEB_DEFAULTS } as SbebOptions,
|
|
779
|
+
schema: SBEB_SCHEMA,
|
|
780
|
+
maxNodes: 10_000,
|
|
781
|
+
run: (input: HighwayInput, o: Readonly<SbebOptions>) => sbebPlan(input, o),
|
|
782
|
+
}),
|
|
783
|
+
areas: defineStrategy({
|
|
784
|
+
step: "highway",
|
|
785
|
+
name: "areas",
|
|
786
|
+
describe: "Image-based edge bundles (HWY-010). Each group of edges is one shaded area around the longest path of the skeleton of its shape.",
|
|
787
|
+
defaults: { ...AREA_DEFAULTS } as AreaOptions,
|
|
788
|
+
schema: AREA_SCHEMA,
|
|
789
|
+
maxNodes: 10_000,
|
|
790
|
+
run: (input: HighwayInput, o: Readonly<AreaOptions>) => areaPlan(input, o),
|
|
791
|
+
}),
|
|
792
|
+
confluent: defineStrategy({
|
|
793
|
+
step: "highway",
|
|
794
|
+
name: "confluent",
|
|
795
|
+
describe: "Confluent drawings (HWY-013). Each biclique of a greedy search is one track, with a merge junction and a split junction.",
|
|
796
|
+
defaults: { ...CONFLUENT_DEFAULTS } as ConfluentOptions,
|
|
797
|
+
schema: CONFLUENT_SCHEMA,
|
|
798
|
+
maxNodes: 10_000,
|
|
799
|
+
run: (input: HighwayInput, o: Readonly<ConfluentOptions>) => confluentPlan(input, o),
|
|
800
|
+
}),
|
|
801
|
+
power: defineStrategy({
|
|
802
|
+
step: "highway",
|
|
803
|
+
name: "power",
|
|
804
|
+
describe: "Edge compression with modules and power graphs (HWY-014). The edges between two modules are one power edge, and a large power edge is a highway.",
|
|
805
|
+
defaults: { ...POWER_DEFAULTS } as PowerOptions,
|
|
806
|
+
schema: POWER_SCHEMA,
|
|
807
|
+
maxNodes: 10_000,
|
|
808
|
+
run: (input: HighwayInput, o: Readonly<PowerOptions>) => powerPlan(input, o),
|
|
809
|
+
}),
|
|
810
|
+
crossbars: defineStrategy({
|
|
811
|
+
step: "highway",
|
|
812
|
+
name: "crossbars",
|
|
813
|
+
describe: "Bundled crossings (HWY-022). Two sets of edges that cross near one place cross as two bundles, at one place.",
|
|
814
|
+
defaults: { ...CROSSBAR_DEFAULTS } as CrossbarOptions,
|
|
815
|
+
schema: CROSSBAR_SCHEMA,
|
|
816
|
+
maxNodes: 10_000,
|
|
817
|
+
run: (input: HighwayInput, o: Readonly<CrossbarOptions>) => crossbarPlan(input, o),
|
|
818
|
+
}),
|
|
819
|
+
frechet: defineStrategy({
|
|
820
|
+
step: "highway",
|
|
821
|
+
name: "frechet",
|
|
822
|
+
describe: "Subtrajectory clusters by the discrete Fréchet distance (HWY-027). The parts of the first routes that stay near one reference part become highways.",
|
|
823
|
+
defaults: { ...FRECHET_DEFAULTS } as FrechetOptions,
|
|
824
|
+
schema: FRECHET_SCHEMA,
|
|
825
|
+
maxNodes: 10_000,
|
|
826
|
+
run: (input: HighwayInput, o: Readonly<FrechetOptions>) => frechetPlan(input, o),
|
|
827
|
+
}),
|
|
828
|
+
spectral: defineStrategy({
|
|
829
|
+
step: "highway",
|
|
830
|
+
name: "spectral",
|
|
831
|
+
describe: "Spectral clustering of the compatibility graph of the edges (HWY-029). The largest eigengap gives the number of clusters, and each cluster gets highways.",
|
|
832
|
+
defaults: { ...SPECTRAL_DEFAULTS } as SpectralOptions,
|
|
833
|
+
schema: SPECTRAL_SCHEMA,
|
|
834
|
+
maxNodes: 10_000,
|
|
835
|
+
run: (input: HighwayInput, o: Readonly<SpectralOptions>) => spectralPlan(input, o),
|
|
836
|
+
}),
|
|
837
|
+
resistance: defineStrategy({
|
|
838
|
+
step: "highway",
|
|
839
|
+
name: "resistance",
|
|
840
|
+
describe: "Spectral bundling with the effective resistance (HWY-021). A pair of two bridges of the graph gets a lower weight, then the clusters of `spectral` apply.",
|
|
841
|
+
defaults: { ...RESISTANCE_DEFAULTS } as ResistanceOptions,
|
|
842
|
+
schema: RESISTANCE_SCHEMA,
|
|
843
|
+
maxNodes: 10_000,
|
|
844
|
+
run: (input: HighwayInput, o: Readonly<ResistanceOptions>) => resistancePlan(input, o),
|
|
845
|
+
}),
|
|
846
|
+
"link-communities": defineStrategy({
|
|
847
|
+
step: "highway",
|
|
848
|
+
name: "link-communities",
|
|
849
|
+
describe: "Link communities on the line graph (HWY-030). The edges with a common node and similar neighbours form communities, and each community gets highways.",
|
|
850
|
+
defaults: { ...LINK_COMMUNITY_DEFAULTS } as LinkCommunityOptions,
|
|
851
|
+
schema: LINK_COMMUNITY_SCHEMA,
|
|
852
|
+
maxNodes: 10_000,
|
|
853
|
+
run: (input: HighwayInput, o: Readonly<LinkCommunityOptions>) => linkCommunityPlan(input, o),
|
|
854
|
+
}),
|
|
855
|
+
territories: defineStrategy({
|
|
856
|
+
step: "highway",
|
|
857
|
+
name: "territories",
|
|
858
|
+
describe: "Territory aggregation of flows (HWY-033). The plugs and bends form cells, and the strong flows between two neighbour cells become highways.",
|
|
859
|
+
defaults: { ...TERRITORY_DEFAULTS } as TerritoryOptions,
|
|
860
|
+
schema: TERRITORY_SCHEMA,
|
|
861
|
+
maxNodes: 10_000,
|
|
862
|
+
run: (input: HighwayInput, o: Readonly<TerritoryOptions>) => territoryPlan(input, o),
|
|
863
|
+
}),
|
|
864
|
+
consensus: defineStrategy({
|
|
865
|
+
step: "highway",
|
|
866
|
+
name: "consensus",
|
|
867
|
+
describe: "A consensus of clusterings (HWY-035). The finders vote on the pairs of edges, and the pairs that most finders agree on form the highways.",
|
|
868
|
+
defaults: { ...CONSENSUS_DEFAULTS } as ConsensusOptions,
|
|
869
|
+
schema: CONSENSUS_SCHEMA,
|
|
870
|
+
maxNodes: 10_000,
|
|
871
|
+
run: (input: HighwayInput, o: Readonly<ConsensusOptions>) => consensusPlan(input, o),
|
|
872
|
+
}),
|
|
873
|
+
"p-hub": defineStrategy({
|
|
874
|
+
step: "highway",
|
|
875
|
+
name: "p-hub",
|
|
876
|
+
describe: "Hub location with the p-hub median (HWY-041). The p-median of the plugs gives the hubs, and the links between two hubs become highways.",
|
|
877
|
+
defaults: { ...P_HUB_DEFAULTS } as PHubOptions,
|
|
878
|
+
schema: P_HUB_SCHEMA,
|
|
879
|
+
maxNodes: 10_000,
|
|
880
|
+
run: (input: HighwayInput, o: Readonly<PHubOptions>) => pHubPlan(input, o),
|
|
881
|
+
}),
|
|
882
|
+
"scale-space": defineStrategy({
|
|
883
|
+
step: "highway",
|
|
884
|
+
name: "scale-space",
|
|
885
|
+
describe: "A scale space with persistence (HWY-053). The clusters of edges that live over a long range of scales get highways at the scale of the plan.",
|
|
886
|
+
defaults: { ...SCALE_SPACE_DEFAULTS } as ScaleSpaceOptions,
|
|
887
|
+
schema: SCALE_SPACE_SCHEMA,
|
|
888
|
+
maxNodes: 10_000,
|
|
889
|
+
run: (input: HighwayInput, o: Readonly<ScaleSpaceOptions>) => scaleSpacePlan(input, o),
|
|
890
|
+
}),
|
|
516
891
|
"corridors+breakeven": gateStrategy(corridors, breakEvenGate),
|
|
517
892
|
"corridors+stretch": gateStrategy(corridors, stretchGate),
|
|
518
893
|
"corridors+ambiguity": gateStrategy(corridors, ambiguityGate),
|