@mark1russell7/highways 0.1.3 → 0.1.5
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 +174 -0
- package/build/index.d.ts +529 -2
- package/build/index.d.ts.map +1 -1
- package/build/index.js +1575 -193
- package/build/index.js.map +1 -1
- package/package.json +1 -1
- package/src/bench/curves.ts +125 -0
- package/src/bench/room.ts +190 -0
- package/src/cases.ts +28 -0
- package/src/curves/arc/index.ts +71 -0
- package/src/curves/index.ts +48 -0
- package/src/curves/model.ts +64 -0
- package/src/curves/rounded/index.ts +60 -0
- package/src/curves/sample.ts +73 -0
- package/src/curves/space.ts +91 -0
- package/src/curves/spline/index.ts +77 -0
- package/src/curves/straight/index.ts +7 -0
- package/src/index.ts +6 -0
- package/src/levels.ts +3 -2
- package/src/room/index.ts +354 -0
- package/src/room/lanes.ts +175 -0
- package/src/routers/index.ts +1 -1
- package/src/strategies/builtins.ts +169 -0
- package/src/strategies/index.ts +2 -0
- package/src/strategies/model.ts +157 -0
- package/src/visibility.ts +28 -3
package/build/index.d.ts
CHANGED
|
@@ -244,6 +244,15 @@ export declare function hubChainBoard(): Graph;
|
|
|
244
244
|
* On a level with many groups, some level links go around the outer edge of the board.
|
|
245
245
|
*/
|
|
246
246
|
export declare function manyGroupsBoard(): Graph;
|
|
247
|
+
/**
|
|
248
|
+
* This function makes the far view of a board after a host layout packs it.
|
|
249
|
+
* The board has 96 boxes of one size in a grid of 12 columns and 8 rows.
|
|
250
|
+
* The boxes touch, with no gap between them. Each box links to a box near it, and 48 long links join boxes far apart.
|
|
251
|
+
* The links have no channel between the boxes. The roadmap item ROOM measures this board before and after `makeRoom`.
|
|
252
|
+
*
|
|
253
|
+
* The board is not in `CASES`, because the digests of the router fix the output on each board of `CASES`.
|
|
254
|
+
*/
|
|
255
|
+
export declare function packedGridBoard(): Graph;
|
|
247
256
|
/** The case boards of the benchmark. Each board has a few hundred nodes at most, so the benchmark races them on each run. */
|
|
248
257
|
export declare const CASES: readonly CaseBoard[];
|
|
249
258
|
/** A plug: the point where a route leaves or enters a node, and the outward normal of its side. */
|
|
@@ -296,6 +305,160 @@ export declare function inflectionCurve(p0: Point, normal: Point, target: Point,
|
|
|
296
305
|
* The curve starts and ends at most `radius` from the vertex, and at most half of each segment. The ends of the polyline stay.
|
|
297
306
|
*/
|
|
298
307
|
export declare function roundCorners(p: readonly Point[], radius: number, steps?: number): Point[];
|
|
308
|
+
/**
|
|
309
|
+
* A type of curve for a route.
|
|
310
|
+
*
|
|
311
|
+
* - `straight`: the polyline as it is.
|
|
312
|
+
* - `rounded`: a quadratic Bezier curve at each corner, as `roundCorners` draws it.
|
|
313
|
+
* - `spline`: a centripetal Catmull-Rom spline through the points. It does not overshoot or make loops.
|
|
314
|
+
* - `arc`: a circular arc at each corner, tangent to the two legs.
|
|
315
|
+
*/
|
|
316
|
+
export type CurveType = "straight" | "rounded" | "spline" | "arc";
|
|
317
|
+
/** The curve types, in the order of the benchmark. */
|
|
318
|
+
export declare const CURVE_TYPES: readonly CurveType[];
|
|
319
|
+
/** The start of a curve: the pen goes to `to` and draws nothing. */
|
|
320
|
+
export interface MoveSegment {
|
|
321
|
+
readonly kind: "move";
|
|
322
|
+
readonly to: Point;
|
|
323
|
+
}
|
|
324
|
+
/** A straight line from the end of the segment before to `to`. */
|
|
325
|
+
export interface LineSegment {
|
|
326
|
+
readonly kind: "line";
|
|
327
|
+
readonly to: Point;
|
|
328
|
+
}
|
|
329
|
+
/** A cubic Bezier curve from the end of the segment before to `to`, with the control points `c1` and `c2`. */
|
|
330
|
+
export interface CubicSegment {
|
|
331
|
+
readonly kind: "cubic";
|
|
332
|
+
readonly c1: Point;
|
|
333
|
+
readonly c2: Point;
|
|
334
|
+
readonly to: Point;
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* A circular arc from the end of the segment before to `to`. The arc has its center at `center` and the radius `radius`.
|
|
338
|
+
* It starts at the angle `start` and turns by `sweep` radians. A positive `sweep` turns from the x axis to the y axis.
|
|
339
|
+
* On a canvas, `ctx.arc(center.x, center.y, radius, start, start + sweep, sweep < 0)` draws it.
|
|
340
|
+
*/
|
|
341
|
+
export interface ArcSegment {
|
|
342
|
+
readonly kind: "arc";
|
|
343
|
+
readonly center: Point;
|
|
344
|
+
readonly radius: number;
|
|
345
|
+
readonly start: number;
|
|
346
|
+
readonly sweep: number;
|
|
347
|
+
readonly to: Point;
|
|
348
|
+
}
|
|
349
|
+
/**
|
|
350
|
+
* A segment of a curve. A curve is a list of segments: one `move` first, then lines, cubic curves and arcs.
|
|
351
|
+
* A renderer maps the list to SVG path data, to canvas calls or to the vertices of a mesh.
|
|
352
|
+
*/
|
|
353
|
+
export type CurveSegment = MoveSegment | LineSegment | CubicSegment | ArcSegment;
|
|
354
|
+
/** This function gives the points of a polyline without the points that are nearer than `eps` to the point before them. */
|
|
355
|
+
export declare function distinctPoints(points: readonly Point[], eps?: number): Point[];
|
|
356
|
+
/**
|
|
357
|
+
* The free space of a board: the boxes that a curve must not go through.
|
|
358
|
+
* Make it one time for a board with `curveSpace`, and give it to each call of `curveOf`.
|
|
359
|
+
*/
|
|
360
|
+
interface CurveSpace {
|
|
361
|
+
/** The boxes of the board. */
|
|
362
|
+
readonly boxes: readonly Box[];
|
|
363
|
+
/** The tolerance of the samples of a curve, in units of the plane. */
|
|
364
|
+
readonly tolerance: number;
|
|
365
|
+
/**
|
|
366
|
+
* This method tells if the polyline `q` goes through a box that the polyline `p` does not go through.
|
|
367
|
+
* A polyline goes through a box when a part of it longer than `TOLERANCE` is inside the box made smaller by `TOLERANCE`.
|
|
368
|
+
*/
|
|
369
|
+
addsHit(q: readonly Point[], p: readonly Point[]): boolean;
|
|
370
|
+
}
|
|
371
|
+
/**
|
|
372
|
+
* This function makes the free space of a board from its boxes. The boxes are the nodes, or the items of a zoom level.
|
|
373
|
+
* The curves sample each piece within `tolerance` of the curve for the test.
|
|
374
|
+
*/
|
|
375
|
+
export declare function curveSpace(boxes: readonly Box[], tolerance?: number): CurveSpace;
|
|
376
|
+
/**
|
|
377
|
+
* This function gives a polyline that follows the curve. The distance from each part of the curve to the polyline is `tolerance` or less.
|
|
378
|
+
* The polyline starts at the point of the `move` and goes through the end of each segment.
|
|
379
|
+
* Hit tests, measures and renderers that draw only lines use this polyline.
|
|
380
|
+
*/
|
|
381
|
+
export declare function sampleCurve(segments: readonly CurveSegment[], tolerance?: number): Point[];
|
|
382
|
+
/** This function gives the point at the parameter `t` of the cubic Bezier curve with the control points `p0`, `p1`, `p2` and `p3`. */
|
|
383
|
+
export declare function cubicAt(p0: Point, p1: Point, p2: Point, p3: Point, t: number): Point;
|
|
384
|
+
/**
|
|
385
|
+
* This function writes the segments as the data of an SVG path: the commands `M`, `L`, `C` and `A`.
|
|
386
|
+
* Each number has at most `digits` digits after the point.
|
|
387
|
+
*/
|
|
388
|
+
export declare function toSvgPath(segments: readonly CurveSegment[], digits?: number): string;
|
|
389
|
+
/** This function gives the polyline as it is: one `move` to the first point and one `line` to each other point. */
|
|
390
|
+
export declare function straightCurve(points: readonly Point[]): CurveSegment[];
|
|
391
|
+
/** The options of `roundedCurve`. */
|
|
392
|
+
interface RoundedOptions {
|
|
393
|
+
/** The largest distance from a corner to the start and to the end of its curve. The default is 12. */
|
|
394
|
+
readonly radius?: number;
|
|
395
|
+
/** The boxes that the curve must not go through. Without it, each corner gets the full radius. */
|
|
396
|
+
readonly space?: CurveSpace;
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* This function rounds each inner vertex of a polyline with a quadratic Bezier curve, as `roundCorners` does.
|
|
400
|
+
* The curve of a corner starts and ends at most `radius` from the vertex, and at most half of each leg. The ends of the polyline stay.
|
|
401
|
+
* The function gives each quadratic curve as the same cubic curve. With `space`, it makes the radius of a corner smaller until the curve
|
|
402
|
+
* goes through no box that the polyline avoids.
|
|
403
|
+
*/
|
|
404
|
+
export declare function roundedCurve(points: readonly Point[], options?: RoundedOptions): CurveSegment[];
|
|
405
|
+
/** The options of `splineCurve`. */
|
|
406
|
+
interface SplineOptions {
|
|
407
|
+
/**
|
|
408
|
+
* The tension of the spline, from 0 to 1. The value 0 gives the centripetal Catmull-Rom spline, and 1 gives the polyline.
|
|
409
|
+
* The default is 0.
|
|
410
|
+
*/
|
|
411
|
+
readonly tension?: number;
|
|
412
|
+
/** The outward normal of the plug at the first point. With it, the curve leaves the first point along this normal. */
|
|
413
|
+
readonly startNormal?: Point;
|
|
414
|
+
/** The outward normal of the plug at the last point. With it, the curve comes into the last point against this normal. */
|
|
415
|
+
readonly endNormal?: Point;
|
|
416
|
+
/** The boxes that the curve must not go through. Without it, each piece gets the full tangents. */
|
|
417
|
+
readonly space?: CurveSpace;
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* This function draws a centripetal Catmull-Rom spline through the points of a polyline (Yuksel, Schaefer and Keyser, 2011).
|
|
421
|
+
* Each piece between two points is one cubic Bezier curve. The centripetal knots keep the curve free of cusps and loops in a piece.
|
|
422
|
+
* The curve goes through each point. Its tangent at a point keeps one direction on the two sides of the point.
|
|
423
|
+
*
|
|
424
|
+
* With `space`, the function makes the tangents of a piece shorter until the piece goes through no box that its leg avoids.
|
|
425
|
+
* A piece with no tangent is the straight leg.
|
|
426
|
+
*/
|
|
427
|
+
export declare function splineCurve(points: readonly Point[], options?: SplineOptions): CurveSegment[];
|
|
428
|
+
/** The options of `arcCurve`. */
|
|
429
|
+
interface ArcOptions {
|
|
430
|
+
/** The largest radius of the arc at a corner. The default is 12. */
|
|
431
|
+
readonly radius?: number;
|
|
432
|
+
/** The boxes that the curve must not go through. Without it, each corner gets the largest radius that fits on its legs. */
|
|
433
|
+
readonly space?: CurveSpace;
|
|
434
|
+
}
|
|
435
|
+
/**
|
|
436
|
+
* This function puts a circular arc at each inner vertex of a polyline. The arc is tangent to the two legs of its corner.
|
|
437
|
+
* The tangent points stay on the first half of each leg, so the ends of the polyline stay.
|
|
438
|
+
* With `space`, the function makes the radius of a corner smaller until the arc goes through no box that the polyline avoids.
|
|
439
|
+
* On a polyline with only horizontal and vertical legs, each arc is a quarter circle.
|
|
440
|
+
*/
|
|
441
|
+
export declare function arcCurve(points: readonly Point[], options?: ArcOptions): CurveSegment[];
|
|
442
|
+
/** The options of `curveOf`. Each type reads only the options that it uses. */
|
|
443
|
+
export interface CurveOptions {
|
|
444
|
+
readonly type: CurveType;
|
|
445
|
+
/** The types `rounded` and `arc` read this radius of the corners. The default is 12. */
|
|
446
|
+
readonly radius?: number;
|
|
447
|
+
/** The type `spline` reads this tension, from 0 to 1. The default is 0. */
|
|
448
|
+
readonly tension?: number;
|
|
449
|
+
/** The type `spline` leaves the first point along this outward normal of its plug. */
|
|
450
|
+
readonly startNormal?: Point;
|
|
451
|
+
/** The type `spline` comes into the last point against this outward normal of its plug. */
|
|
452
|
+
readonly endNormal?: Point;
|
|
453
|
+
/** The boxes that the curve must not go through, from `curveSpace`. The type `straight` does not read it. */
|
|
454
|
+
readonly space?: CurveSpace;
|
|
455
|
+
}
|
|
456
|
+
/**
|
|
457
|
+
* This function gives the curve of a route: a polyline of a router, a lane of `laneRoutes` or a link of a zoom level.
|
|
458
|
+
* The curve starts at the first point and ends at the last point of the polyline.
|
|
459
|
+
* The output is a list of segments for any renderer. `toSvgPath` writes it as SVG path data, and `sampleCurve` gives points.
|
|
460
|
+
*/
|
|
461
|
+
export declare function curveOf(points: readonly Point[], options: CurveOptions): CurveSegment[];
|
|
299
462
|
/** The nodes as obstacles, with a grid for fast tests. */
|
|
300
463
|
export declare class Obstacles {
|
|
301
464
|
#private;
|
|
@@ -338,6 +501,11 @@ export interface CornerGraphOptions {
|
|
|
338
501
|
* The lattice links groups of nodes across empty space. Without it, the nearest corners of a group are all in that group.
|
|
339
502
|
*/
|
|
340
503
|
readonly lattice?: number;
|
|
504
|
+
/**
|
|
505
|
+
* With `cones`, each corner also links to the nearest corner that it can see in each of four cones around the axes.
|
|
506
|
+
* Then a path can go along a long corridor between rows or columns of boxes. The default is false.
|
|
507
|
+
*/
|
|
508
|
+
readonly cones?: boolean;
|
|
341
509
|
}
|
|
342
510
|
/**
|
|
343
511
|
* A sparse visibility graph. Its vertices are the corners of the boxes, made larger by `margin`.
|
|
@@ -602,8 +770,123 @@ export declare function splitPoint(start: Point, targets: readonly Point[], spli
|
|
|
602
770
|
* The edges outside the groups go as in the corner router.
|
|
603
771
|
*/
|
|
604
772
|
export declare function trunksRouter(options: TrunksOptions): Router;
|
|
605
|
-
/** The routers
|
|
773
|
+
/** The built-in routers. The registry `STRATEGIES` holds the same routers as strategies, and the benchmark races the routers of the registry. */
|
|
606
774
|
export declare const ROUTERS: readonly Router[];
|
|
775
|
+
/** An item with a box: a node of a graph, an item of a level or a box of a host layout. */
|
|
776
|
+
export interface Boxed {
|
|
777
|
+
readonly id: string;
|
|
778
|
+
readonly box: Box;
|
|
779
|
+
}
|
|
780
|
+
/** A link between two boxes. For a bundled link, `count` is the number of its edges. The default count is 1. */
|
|
781
|
+
export interface RoomLink {
|
|
782
|
+
readonly source: string;
|
|
783
|
+
readonly target: string;
|
|
784
|
+
readonly count?: number;
|
|
785
|
+
}
|
|
786
|
+
/**
|
|
787
|
+
* A gap of a board: a boundary of the sweep over the left or top edges of the boxes.
|
|
788
|
+
* On the axis `x`, the gap is a vertical channel between two columns. On the axis `y`, it is a horizontal channel between two rows.
|
|
789
|
+
*/
|
|
790
|
+
export interface Gap {
|
|
791
|
+
readonly axis: "x" | "y";
|
|
792
|
+
/** The place of the gap in the order of the gaps on its axis, from 0. */
|
|
793
|
+
readonly index: number;
|
|
794
|
+
/** The coordinate where the boxes after the gap start, on the axis of the gap. */
|
|
795
|
+
readonly at: number;
|
|
796
|
+
/** The ids of the boxes that end at the near side of the gap. */
|
|
797
|
+
readonly before: readonly string[];
|
|
798
|
+
/** The ids of the boxes that start at the far side of the gap, at `at`. */
|
|
799
|
+
readonly after: readonly string[];
|
|
800
|
+
/** The current width of the gap: the distance from the nearest box edge before the gap to `at`. */
|
|
801
|
+
readonly width: number;
|
|
802
|
+
/** The number of lanes that the links need in the gap. */
|
|
803
|
+
readonly lanes: number;
|
|
804
|
+
/** The width that the gap needs: at least the current width, and at least `gutter + lanes × spacing`. */
|
|
805
|
+
readonly need: number;
|
|
806
|
+
}
|
|
807
|
+
/** The ways that `roomDemand` finds the lanes of each gap. */
|
|
808
|
+
export type RoomMethod = "routes" | "lines";
|
|
809
|
+
/** The options of `roomDemand` and `makeRoom`. */
|
|
810
|
+
export interface RoomOptions {
|
|
811
|
+
/** The smallest width of each gap. The default is 8. */
|
|
812
|
+
readonly gutter?: number;
|
|
813
|
+
/** The width of one lane: the distance between two lines that run side by side. The default is 4. */
|
|
814
|
+
readonly spacing?: number;
|
|
815
|
+
/**
|
|
816
|
+
* The largest growth of the board on each axis, as a share of its size. The default is `Infinity`.
|
|
817
|
+
* When the lanes need more, each gap gets its gutter, and the lanes share the rest in proportion.
|
|
818
|
+
*/
|
|
819
|
+
readonly maxGrowth?: number;
|
|
820
|
+
/**
|
|
821
|
+
* The way to find the lanes. The default is `routes`.
|
|
822
|
+
* With `routes`, the function routes the links one time on the board with each gap open to the gutter.
|
|
823
|
+
* The lanes of a gap are the most routes that run along the gap side by side.
|
|
824
|
+
* With `lines`, the lanes of a gap are the straight lines between the centers of the boxes that cross the gap.
|
|
825
|
+
*/
|
|
826
|
+
readonly method?: RoomMethod;
|
|
827
|
+
/** The router of the method `routes`. Without it, the links go as the links of a zoom level (`levelLinks`), with the margin `gutter / 2`. */
|
|
828
|
+
readonly router?: Router;
|
|
829
|
+
/** With `count`, a link takes one lane for each of its edges. With `link`, the default, a link takes one lane. */
|
|
830
|
+
readonly lanes?: "link" | "count";
|
|
831
|
+
/** Two box edges nearer than this distance make one boundary of the sweep. The default is 0.5. */
|
|
832
|
+
readonly snap?: number;
|
|
833
|
+
/**
|
|
834
|
+
* The number of passes of the demand. The default is 1.
|
|
835
|
+
* Each pass after the first finds the lanes again on the board that the passes before it opened, and adds the growth that it needs.
|
|
836
|
+
* The limit `maxGrowth` applies to the sum of the passes.
|
|
837
|
+
*/
|
|
838
|
+
readonly passes?: number;
|
|
839
|
+
}
|
|
840
|
+
/** The demand of a board and the board with its gaps open. */
|
|
841
|
+
export interface Room<T extends Boxed> {
|
|
842
|
+
readonly gaps: readonly Gap[];
|
|
843
|
+
readonly items: T[];
|
|
844
|
+
}
|
|
845
|
+
/**
|
|
846
|
+
* This function gives the gaps of a board. A sweep over each axis sorts the left (or top) edges of the boxes.
|
|
847
|
+
* Each distinct edge after the first is a gap. The `lanes` of each gap are 0, and its `need` is its current width.
|
|
848
|
+
*/
|
|
849
|
+
export declare function boardGaps(items: readonly Boxed[], snap?: number): Gap[];
|
|
850
|
+
/**
|
|
851
|
+
* This function moves the boxes apart, so that each gap gets the width `need`. The boxes keep their size, their order and their alignment.
|
|
852
|
+
* A box moves by the sum of the growth of each gap at or before its left (or top) edge. Thus a grid stays a grid.
|
|
853
|
+
* The function moves no box nearer to another box, so it makes no overlap.
|
|
854
|
+
*/
|
|
855
|
+
export declare function openGaps<T extends Boxed>(items: readonly T[], gaps: readonly Gap[], snap?: number): T[];
|
|
856
|
+
/**
|
|
857
|
+
* This function gives the room that the links need in each gap of the board.
|
|
858
|
+
* The lanes of a gap come from the `method` of the options. The need of a gap is `gutter + lanes × spacing`, and not less than its current width.
|
|
859
|
+
*/
|
|
860
|
+
export declare function roomDemand(items: readonly Boxed[], links: readonly RoomLink[], options?: RoomOptions): Gap[];
|
|
861
|
+
/** This function gives the demand of the board and the board with each gap open to its need. */
|
|
862
|
+
export declare function makeRoom<T extends Boxed>(items: readonly T[], links: readonly RoomLink[], options?: RoomOptions): Room<T>;
|
|
863
|
+
/** This function gives the links between the nodes of a graph, with the count of the edges of each pair. A loop does not count. */
|
|
864
|
+
export declare function roomLinks(graph: Graph): RoomLink[];
|
|
865
|
+
/**
|
|
866
|
+
* The lane order of the pieces of the links in one gap.
|
|
867
|
+
*
|
|
868
|
+
* - `links`: the order of the list of links. This order reads nothing of the board.
|
|
869
|
+
* - `ends`: the pieces that turn to the near side at their two ends come first. The pieces that turn to the far side come last.
|
|
870
|
+
* - `crossings`: the order with the fewest crossings between the pieces of the gap and the legs at their ends. A local search finds it.
|
|
871
|
+
*/
|
|
872
|
+
export type LaneOrder = "links" | "ends" | "crossings";
|
|
873
|
+
/** The lane orders of `gapLanes`, in the order of the benchmark. */
|
|
874
|
+
export declare const LANE_ORDERS: readonly LaneOrder[];
|
|
875
|
+
/** The options of `gapLanes`. */
|
|
876
|
+
export interface GapLaneOptions {
|
|
877
|
+
/** The largest distance between two lanes. A narrow gap puts its lanes nearer. The default is 4. */
|
|
878
|
+
readonly spacing?: number;
|
|
879
|
+
/** The lane order in each gap. The default is `crossings`. */
|
|
880
|
+
readonly order?: LaneOrder;
|
|
881
|
+
/** Two box edges nearer than this distance make one boundary of the sweep, as in `boardGaps`. The default is 0.5. */
|
|
882
|
+
readonly snap?: number;
|
|
883
|
+
}
|
|
884
|
+
/**
|
|
885
|
+
* This function gives each link that runs along a gap its own lane in the gap. The lanes of a gap are `spacing` apart, around its middle line.
|
|
886
|
+
* A leg of a link moves across its gap only, so the link keeps its plugs and the axes of its legs.
|
|
887
|
+
* When a move puts a link through more boxes than before, the link keeps its points.
|
|
888
|
+
*/
|
|
889
|
+
export declare function gapLanes(items: readonly Boxed[], links: readonly LevelLink[], options?: GapLaneOptions): LevelLink[];
|
|
607
890
|
/** A broken hard rule. A correct router has none. */
|
|
608
891
|
export interface Violation {
|
|
609
892
|
readonly rule: "complete" | "ends-at-plugs" | "fixed-plugs" | "no-pass-through" | "counts-sum" | "link-ends" | "bundle-trunk" | "run-shared";
|
|
@@ -783,5 +1066,249 @@ export declare function formatTable(rows: readonly BenchRow[]): string;
|
|
|
783
1066
|
* A router without such levels gets a dash in the columns of the levels.
|
|
784
1067
|
*/
|
|
785
1068
|
export declare function formatFaults(rows: readonly BenchRow[]): string;
|
|
786
|
-
|
|
1069
|
+
/** The input of a curve strategy: one polyline and the context of its route. */
|
|
1070
|
+
export interface CurveInput {
|
|
1071
|
+
/** These points are the polyline: a route of a router, a lane of `laneRoutes` or a link of a zoom level. */
|
|
1072
|
+
readonly points: readonly Point[];
|
|
1073
|
+
/** The curve leaves the first point along this outward normal of its plug, if the strategy reads it. */
|
|
1074
|
+
readonly startNormal?: Point;
|
|
1075
|
+
/** The curve comes into the last point against this outward normal of its plug, if the strategy reads it. */
|
|
1076
|
+
readonly endNormal?: Point;
|
|
1077
|
+
/** The boxes that the curve must not go through, from `curveSpace`. */
|
|
1078
|
+
readonly space?: CurveSpace;
|
|
1079
|
+
}
|
|
1080
|
+
/** The input of a room strategy: the boxes of a board and the links between them. */
|
|
1081
|
+
export interface RoomInput {
|
|
1082
|
+
readonly items: readonly Boxed[];
|
|
1083
|
+
readonly links: readonly RoomLink[];
|
|
1084
|
+
}
|
|
1085
|
+
/**
|
|
1086
|
+
* The steps that have strategies, with the fixed input and output type of each step.
|
|
1087
|
+
*
|
|
1088
|
+
* - `router`: a graph in, the routes (and the `levels`, `bundles` and `runs`) out.
|
|
1089
|
+
* - `curve`: a polyline in, the segments of a curve out.
|
|
1090
|
+
* - `room`: the boxes and links of a board in, the gaps of the board with their need out.
|
|
1091
|
+
*/
|
|
1092
|
+
export interface StepTypes {
|
|
1093
|
+
readonly router: {
|
|
1094
|
+
readonly input: Graph;
|
|
1095
|
+
readonly output: Result;
|
|
1096
|
+
};
|
|
1097
|
+
readonly curve: {
|
|
1098
|
+
readonly input: CurveInput;
|
|
1099
|
+
readonly output: CurveSegment[];
|
|
1100
|
+
};
|
|
1101
|
+
readonly room: {
|
|
1102
|
+
readonly input: RoomInput;
|
|
1103
|
+
readonly output: Gap[];
|
|
1104
|
+
};
|
|
1105
|
+
}
|
|
1106
|
+
/** The name of a step that has strategies. */
|
|
1107
|
+
export type Step = keyof StepTypes;
|
|
1108
|
+
/** The input type of a step. */
|
|
1109
|
+
export type StepInput<S extends Step> = StepTypes[S]["input"];
|
|
1110
|
+
/** The output type of a step. */
|
|
1111
|
+
export type StepOutput<S extends Step> = StepTypes[S]["output"];
|
|
1112
|
+
/** The steps that have strategies, in the order of the pipeline. */
|
|
1113
|
+
export declare const STEPS: readonly Step[];
|
|
1114
|
+
/**
|
|
1115
|
+
* A strategy: one way to do one step, with a name and a description.
|
|
1116
|
+
* The same input and the same options must give the same output.
|
|
1117
|
+
*/
|
|
1118
|
+
export interface Strategy<S extends Step = Step, O extends object = object> {
|
|
1119
|
+
/** The step of the strategy. It fixes the input and the output type. */
|
|
1120
|
+
readonly step: S;
|
|
1121
|
+
/** The name of the strategy. Each name is unique in its step of a registry. */
|
|
1122
|
+
readonly name: string;
|
|
1123
|
+
/** One or two sentences that tell what the strategy does. The site and the documents show them. */
|
|
1124
|
+
readonly describe: string;
|
|
1125
|
+
/** The values of the options when the caller gives no value. */
|
|
1126
|
+
readonly defaults: Readonly<O>;
|
|
1127
|
+
/** The benchmark skips an input with more nodes than this. Without it, the strategy takes each input. */
|
|
1128
|
+
readonly maxNodes?: number;
|
|
1129
|
+
/** This method does the step. Each option that `options` does not give gets its value from `defaults`. */
|
|
1130
|
+
run(input: StepInput<S>, options?: Partial<O>): StepOutput<S>;
|
|
1131
|
+
}
|
|
1132
|
+
/** A strategy of any step. A registry holds a list of these. */
|
|
1133
|
+
export type AnyStrategy = { [S in Step]: Strategy<S>; }[Step];
|
|
1134
|
+
/** The definition of a strategy, for `defineStrategy`. */
|
|
1135
|
+
export interface StrategyDefinition<S extends Step, O extends object> {
|
|
1136
|
+
readonly step: S;
|
|
1137
|
+
readonly name: string;
|
|
1138
|
+
readonly describe: string;
|
|
1139
|
+
/** These values are the options when the caller gives no value. Give `{}` for a strategy without options. */
|
|
1140
|
+
readonly defaults: O;
|
|
1141
|
+
readonly maxNodes?: number;
|
|
1142
|
+
/** This function does the step. It gets each option, from the caller or from `defaults`. */
|
|
1143
|
+
run(input: StepInput<S>, options: Readonly<O>): StepOutput<S>;
|
|
1144
|
+
}
|
|
1145
|
+
/**
|
|
1146
|
+
* This function makes a strategy from its definition. The strategy fills the missing options from `defaults`.
|
|
1147
|
+
* When the caller gives no option, the definition gets the `defaults` object itself.
|
|
1148
|
+
*/
|
|
1149
|
+
export declare function defineStrategy<S extends Step, O extends object>(definition: StrategyDefinition<S, O>): Strategy<S, O>;
|
|
1150
|
+
/**
|
|
1151
|
+
* A registry: the strategies of each step, in order. A registry is data. No import changes it.
|
|
1152
|
+
* A consumer makes its own registry with `createRegistry`, and adds a strategy with `register`.
|
|
1153
|
+
*/
|
|
1154
|
+
export type Registry = { readonly [S in Step]: readonly Strategy<S>[]; };
|
|
1155
|
+
/** This function makes a registry from a list of strategies. It keeps their order. Two strategies with one step and one name are an error. */
|
|
1156
|
+
export declare function createRegistry(strategies: readonly AnyStrategy[]): Registry;
|
|
1157
|
+
/** This function gives a new registry with the strategies of `registry` and then `strategies`. It does not change `registry`. */
|
|
1158
|
+
export declare function register(registry: Registry, ...strategies: readonly AnyStrategy[]): Registry;
|
|
1159
|
+
/** This function gives the strategies of one step of a registry, in order. */
|
|
1160
|
+
export declare function listStrategies<S extends Step>(registry: Registry, step: S): readonly Strategy<S>[];
|
|
1161
|
+
/** This function gives the strategy of one step with a name, or `undefined` when the registry has no such strategy. */
|
|
1162
|
+
export declare function findStrategy<S extends Step>(registry: Registry, step: S, name: string): Strategy<S> | undefined;
|
|
1163
|
+
/** This function gives the strategy of one step with a name. When the registry has no such strategy, the function throws an error. */
|
|
1164
|
+
export declare function getStrategy<S extends Step>(registry: Registry, step: S, name: string): Strategy<S>;
|
|
1165
|
+
/** This function gives a `Router` that runs a router strategy with the options. The router keeps the name and the `maxNodes` of the strategy. */
|
|
1166
|
+
export declare function asRouter<O extends object>(strategy: Strategy<"router", O>, options?: Partial<O>): Router;
|
|
1167
|
+
/** This function gives the router strategies of a registry as `Router` objects, in order. The benchmark races them. */
|
|
1168
|
+
export declare function routersOf(registry: Registry): Router[];
|
|
1169
|
+
/**
|
|
1170
|
+
* One row of the benchmark of the curves: one curve type on the routes of one router on one fixture.
|
|
1171
|
+
* The type `T` of the name of the curve is `CurveType` for `benchCurves`, and `string` for `benchCurveStrategies`.
|
|
1172
|
+
*/
|
|
1173
|
+
export interface CurveBenchRow<T extends string = CurveType> {
|
|
1174
|
+
readonly router: string;
|
|
1175
|
+
readonly fixture: string;
|
|
1176
|
+
readonly type: T;
|
|
1177
|
+
/** The number of routes. */
|
|
1178
|
+
readonly links: number;
|
|
1179
|
+
/** The number of polylines that go through a box that is not one of their ends (`measureLinks`). */
|
|
1180
|
+
readonly through: number;
|
|
1181
|
+
/** The number of curves without a free space that go through such a box. */
|
|
1182
|
+
readonly free: number;
|
|
1183
|
+
/** The number of curves with the free space of the nodes (`curveSpace`) that go through such a box. */
|
|
1184
|
+
readonly clamped: number;
|
|
1185
|
+
/** The ratio of the length of all curves with the free space to the length of all polylines. */
|
|
1186
|
+
readonly length: number;
|
|
1187
|
+
/** The time to make all curves with the free space, in milliseconds. */
|
|
1188
|
+
readonly ms: number;
|
|
1189
|
+
}
|
|
1190
|
+
/** The options of `benchCurves`. */
|
|
1191
|
+
export interface CurveBenchOptions {
|
|
1192
|
+
/** The radius of the types `rounded` and `arc`. The default is 12. */
|
|
1193
|
+
readonly radius?: number;
|
|
1194
|
+
/** The tolerance of the samples of the curves. The default is 0.25. */
|
|
1195
|
+
readonly tolerance?: number;
|
|
1196
|
+
}
|
|
1197
|
+
/**
|
|
1198
|
+
* This function routes a graph with a router and makes each curve type of each route.
|
|
1199
|
+
* It counts the curves that go through a box, with and without the free space, and it compares their length to the polylines.
|
|
1200
|
+
* The type `spline` leaves each plug along the normal of the nearest side of its node.
|
|
1201
|
+
*/
|
|
1202
|
+
export declare function benchCurves(router: Router, fixture: string, graph: Graph, options?: CurveBenchOptions): CurveBenchRow[];
|
|
1203
|
+
/**
|
|
1204
|
+
* This function does the work of `benchCurves` with a list of curve strategies, in place of the curve types.
|
|
1205
|
+
* The option `radius` goes to each strategy. A strategy without such an option does not read it.
|
|
1206
|
+
*/
|
|
1207
|
+
export declare function benchCurveStrategies(router: Router, fixture: string, graph: Graph, curves: readonly Strategy<"curve">[], options?: CurveBenchOptions): CurveBenchRow<string>[];
|
|
1208
|
+
/** This function writes the rows of `benchCurves` as a Markdown table. */
|
|
1209
|
+
export declare function formatCurves(rows: readonly CurveBenchRow<string>[]): string;
|
|
1210
|
+
/** One row of the benchmark of the room: one state of a board, packed or open, and the measures of its links. */
|
|
1211
|
+
export interface RoomBenchRow {
|
|
1212
|
+
readonly fixture: string;
|
|
1213
|
+
/** The state of the board: `packed`, `gutter` (each gap open to the gutter only), or a method of `roomDemand`. */
|
|
1214
|
+
readonly board: string;
|
|
1215
|
+
/** The area of the bounding box of the boxes, as a share of the area of the packed board. */
|
|
1216
|
+
readonly area: number;
|
|
1217
|
+
/** The faults of the links of the far view (`levelLinks` with each box as one item). */
|
|
1218
|
+
readonly faults: LinkFaults;
|
|
1219
|
+
/** The crossings of the links of the far view (`measureQuality`). */
|
|
1220
|
+
readonly crossings: number;
|
|
1221
|
+
/** The ink of the links of the far view. */
|
|
1222
|
+
readonly ink: number;
|
|
1223
|
+
/** The mean detour of the links of the far view. */
|
|
1224
|
+
readonly detour: number;
|
|
1225
|
+
/**
|
|
1226
|
+
* The number of lane routes of the router `sections` that go through a box. Each shared segment opens to one lane for each edge,
|
|
1227
|
+
* at the spacing of the options (`laneRoutes`).
|
|
1228
|
+
*/
|
|
1229
|
+
readonly laneThrough: number;
|
|
1230
|
+
/** The time of `makeRoom`, in milliseconds. It is 0 for the packed board. */
|
|
1231
|
+
readonly ms: number;
|
|
1232
|
+
}
|
|
1233
|
+
/**
|
|
1234
|
+
* This function measures the links of one board. It measures the links of the far view, with each node of the graph as one item of a level.
|
|
1235
|
+
* With a lane order, each link of the far view gets its own lane in each gap (`gapLanes` at the lane width `spacing`).
|
|
1236
|
+
* Without it, the links of a gap share the lines of the level links.
|
|
1237
|
+
* The function also measures the lane routes of the router `sections` at the lane width `spacing`.
|
|
1238
|
+
*/
|
|
1239
|
+
export declare function measureBoard(graph: Graph, spacing: number, order?: LaneOrder): Omit<RoomBenchRow, "fixture" | "board" | "area" | "ms">;
|
|
1240
|
+
/**
|
|
1241
|
+
* This function measures a packed board, the board with each gap open to the gutter only, and the board that each room strategy opens.
|
|
1242
|
+
* The options are the same for each strategy, except `method`. The default strategies are the methods `routes` and `lines` of `roomDemand`.
|
|
1243
|
+
*/
|
|
1244
|
+
export declare function benchRoom(fixture: string, graph: Graph, options?: RoomOptions, methods?: readonly Strategy<"room">[]): RoomBenchRow[];
|
|
1245
|
+
/** One setting of a sweep of the room: the options of `makeRoom` and the lane order of the far view. */
|
|
1246
|
+
export interface RoomSetting {
|
|
1247
|
+
/** The name of the setting in the column `board`. */
|
|
1248
|
+
readonly name: string;
|
|
1249
|
+
readonly options: RoomOptions;
|
|
1250
|
+
/** The lane order of the far view. Without it, the links of a gap share the lines of the level links. */
|
|
1251
|
+
readonly lanes?: LaneOrder;
|
|
1252
|
+
}
|
|
1253
|
+
/**
|
|
1254
|
+
* This function measures the board that `makeRoom` opens with each setting, with the method `routes`.
|
|
1255
|
+
* The first row is the fair baseline: the board with each gap open to the gutter of `baseline` only, measured at the spacing of `baseline`.
|
|
1256
|
+
*/
|
|
1257
|
+
export declare function sweepRoom(fixture: string, graph: Graph, settings: readonly RoomSetting[], baseline?: RoomOptions): RoomBenchRow[];
|
|
1258
|
+
/** The values of `maxGrowth` of the sweep of ROOM-A. */
|
|
1259
|
+
export declare const GROWTH_SWEEP: readonly number[];
|
|
1260
|
+
/** This function gives the settings of ROOM-A: the area and the faults for each `maxGrowth`, at gutter 8 and spacing 4. */
|
|
1261
|
+
export declare function growthSettings(values?: readonly number[]): RoomSetting[];
|
|
1262
|
+
/**
|
|
1263
|
+
* This function gives the settings of ROOM-C: each lane order of the far view at each spacing, at gutter 8.
|
|
1264
|
+
* The order `shared` is the far view without lanes, as before ROOM-C.
|
|
1265
|
+
*/
|
|
1266
|
+
export declare function laneSettings(spacings?: readonly number[], orders?: readonly LaneOrder[]): RoomSetting[];
|
|
1267
|
+
/** This function gives the settings of ROOM-D: each gutter with each number of passes, at spacing 4. */
|
|
1268
|
+
export declare function passSettings(gutters?: readonly number[], passes?: readonly number[]): RoomSetting[];
|
|
1269
|
+
/** This function writes the rows of `benchRoom` as a Markdown table. */
|
|
1270
|
+
export declare function formatRoom(rows: readonly RoomBenchRow[]): string;
|
|
1271
|
+
/** The options of a router strategy: the options of its router, without the name and the limit of the benchmark. */
|
|
1272
|
+
export type RouterPreset<O> = Omit<O, "name" | "maxNodes">;
|
|
1273
|
+
/** The built-in router strategies, in the order of the benchmark. They route as the routers of `ROUTERS`. */
|
|
1274
|
+
export declare const routerStrategies: {
|
|
1275
|
+
readonly straight: Strategy<"router", object>;
|
|
1276
|
+
readonly plugs: Strategy<"router", object>;
|
|
1277
|
+
readonly corners: Strategy<"router", RouterPreset<CornersOptions>>;
|
|
1278
|
+
readonly "corners-smooth": Strategy<"router", RouterPreset<CornersOptions>>;
|
|
1279
|
+
readonly trunks: Strategy<"router", RouterPreset<TrunksOptions>>;
|
|
1280
|
+
readonly shared: Strategy<"router", RouterPreset<SharedOptions>>;
|
|
1281
|
+
readonly "shared-all": Strategy<"router", RouterPreset<SharedOptions>>;
|
|
1282
|
+
readonly sections: Strategy<"router", RouterPreset<SectionsOptions>>;
|
|
1283
|
+
readonly "sections-tree": Strategy<"router", RouterPreset<SectionsOptions>>;
|
|
1284
|
+
};
|
|
1285
|
+
/** The options of the curve strategies `rounded` and `arc`. */
|
|
1286
|
+
export interface RadiusOptions {
|
|
1287
|
+
/** The radius of the corners. The default is 12. */
|
|
1288
|
+
readonly radius: number;
|
|
1289
|
+
}
|
|
1290
|
+
/** The options of the curve strategy `spline`. */
|
|
1291
|
+
export interface TensionOptions {
|
|
1292
|
+
/** The tension of the spline, from 0 (the spline) to 1 (the polyline). The default is 0. */
|
|
1293
|
+
readonly tension: number;
|
|
1294
|
+
}
|
|
1295
|
+
/** The built-in curve strategies, in the order of `CURVE_TYPES`. Each one gives the same segments as `curveOf` with its type. */
|
|
1296
|
+
export declare const curveStrategies: {
|
|
1297
|
+
readonly straight: Strategy<"curve", object>;
|
|
1298
|
+
readonly rounded: Strategy<"curve", RadiusOptions>;
|
|
1299
|
+
readonly spline: Strategy<"curve", TensionOptions>;
|
|
1300
|
+
readonly arc: Strategy<"curve", RadiusOptions>;
|
|
1301
|
+
};
|
|
1302
|
+
/** The options of a room strategy: the options of `roomDemand`, without the method. */
|
|
1303
|
+
export type RoomPreset = Omit<RoomOptions, "method">;
|
|
1304
|
+
/** The built-in room strategies: the methods of `roomDemand`. */
|
|
1305
|
+
export declare const roomStrategies: {
|
|
1306
|
+
readonly routes: Strategy<"room", RoomPreset>;
|
|
1307
|
+
readonly lines: Strategy<"room", RoomPreset>;
|
|
1308
|
+
};
|
|
1309
|
+
/** The built-in strategies of each step, in order. A consumer adds its own: `createRegistry([...BUILT_IN_STRATEGIES, mine])`. */
|
|
1310
|
+
export declare const BUILT_IN_STRATEGIES: readonly AnyStrategy[];
|
|
1311
|
+
/** The registry of the built-in strategies. The benchmark and the site take their lists from it. */
|
|
1312
|
+
export declare const STRATEGIES: Registry;
|
|
1313
|
+
export type { ArcOptions, CornersOptions, CurveSpace, RoundedOptions, SectionsOptions, SharedOptions, SplineOptions, TrunksOptions };
|
|
787
1314
|
//# sourceMappingURL=index.d.ts.map
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/geom.ts","../src/grid.ts","../src/model.ts","../src/fixtures.ts","../src/cases.ts","../src/plugs.ts","../src/curves.ts","../src/visibility.ts","../src/ways.ts","../src/segments.ts","../src/sections.ts","../src/routers/straight.ts","../src/routers/plugs.ts","../src/routers/corners.ts","../src/routers/shared.ts","../src/routers/sections.ts","../src/routers/trunks.ts","../src/routers/index.ts","../src/bench/properties.ts","../src/bench/quality.ts","../src/bench/links.ts","../src/bench/run.ts"],"mappings":";iBACiB;WACN;WAC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AIM;WACN;WACA;WACA;WACA,iBAAiB;;;iBAIX;WACN,iBAAiB;WACjB,kBAAkB;WAClB,mBAAmB;;WAEnB,gBAAgB;;;;;;iBAOV;WACN;;WAEA;;WAEA;;WAEA;;WAEA,gBAAgB;;;;;;iBAOV;WACN;;WAEA;WACA,iBAAiB;;WAEjB;;;YAIC,aAAa,MAAM;;iBAGd;WACN;;WAEA;EACT,MAAM,OAAO,QAAQ;;;wBAIP,UAAU,GAAG,QAAQ,YAAY;;wBAOjC,eAAe,MAAM,MAAM,KAAK,MAAM;;wBC/HtC,IAAI;;;;;YAeR;;iBAGK;WACN;WACA,MAAM;WACN;;WAEA;WACA;;WAEA;;WAEA;;;qBAIE,mBAAmB;;;;;wBAqBhB,YAAY,MAAM,cAAc;;;;;iBCnD/B;WACN;;WAEA;;WAEA,YAAY;;;;;;wBA+BP,oBAAoB;;;;;;wBASpB,iBAAiB;;;;;;wBAuBjB,mBAAmB;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/geom.ts","../src/grid.ts","../src/model.ts","../src/fixtures.ts","../src/cases.ts","../src/plugs.ts","../src/curves.ts","../src/curves/model.ts","../src/curves/space.ts","../src/curves/sample.ts","../src/curves/straight/index.ts","../src/curves/rounded/index.ts","../src/curves/spline/index.ts","../src/curves/arc/index.ts","../src/curves/index.ts","../src/visibility.ts","../src/ways.ts","../src/segments.ts","../src/sections.ts","../src/routers/straight.ts","../src/routers/plugs.ts","../src/routers/corners.ts","../src/routers/shared.ts","../src/routers/sections.ts","../src/routers/trunks.ts","../src/routers/index.ts","../src/room/index.ts","../src/room/lanes.ts","../src/bench/properties.ts","../src/bench/quality.ts","../src/bench/links.ts","../src/bench/run.ts","../src/strategies/model.ts","../src/bench/curves.ts","../src/bench/room.ts","../src/strategies/builtins.ts"],"mappings":";iBACiB;WACN;WACA;;;iBAIM;WACN;WACA;WACA;WACA;;;wBAIK,KAAK,GAAG,OAAO,GAAG;;wBAOlB,OAAO,GAAG,MAA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