@mark1russell7/layout-contract 0.2.4 → 0.2.6

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 CHANGED
@@ -16,6 +16,10 @@ The package has no runtime dependencies.
16
16
  | The measures | `MeasureSpec`, `Direction`, `JointMeasureId`, `JOINT_MEASURES`, `JOINT_MOVED_MIN`, `Verdict`, `compareMeasure`, `minEffectOf` |
17
17
  | The edges step | `edgeStep`, `EdgeShape`, `EdgeStepParams`, `EDGE_DENSITY`, `EDGE_STEP_VERSION` |
18
18
  | The random numbers | `mulberry32`, `fnv1a32`, `stepRandom`, `randomInt` |
19
+ | The hashes | `sha256Hex`, `canonicalJson`, `documentHash`, `outputHash`, `HashOptions` |
20
+ | The promotion guards | `outputGroups`, `OutputGroup`, `exercised`, `ExerciseEvidence` |
21
+ | The portfolio | `portfolio`, `Portfolio`, `PortfolioKey`, `PortfolioLevel`, `PortfolioOptions`, `PortfolioPick`, `PortfolioTrace`, `Member`, `MemberTrace`, `MemberStatus`, `pickMoves` |
22
+ | The pick rule | `selectBest`, `SelectCandidate`, `SelectLevel`, `Selection`, `PickSpec` |
19
23
  | The turn | `turnBox`, `turnPort`, `turnMargin`, `turnRegion`, `turnSide`, `turnPoint` |
20
24
  | The tolerances | `EPS`, `RECORD_EPS`, `Tolerance`, `DEFAULT_TOLERANCE` |
21
25
  | The hard rules | `countOverlaps`, `countObstacleHits`, `regionHitsRect`, `rectInRegion`, `countOutside`, `ContainerTest`, `countPortsOffBorder`, `packHard`, `PackHard`, `placedRect`, `checkInput` |
@@ -29,6 +33,7 @@ The package has no runtime dependencies.
29
33
  - **The hard rules of a pack.** `no-overlap` counts the pairs of boxes and the pairs of a box and an obstacle. A locked box without a placement, or with a move of more than `RECORD_EPS`, breaks `locked-kept`. `checkInput` refuses a locked box without a position. Another box without a placement and not in `overflow` breaks `complete`.
30
34
  - **The container rule.** `in-container` counts each box that goes out of the container made smaller by `inset`. The box counts with its margin. By default, a shaped container counts as its bounding box.
31
35
  - **The exact container.** Give `{ exactContainer: true }` to `packHard` or `countOutside`. Then a box of a shaped container with the size `fixed` must stay inside the shape. A cut corner, a notch and a hole count. A container with a free side keeps the bounding test. The default changes to the exact test at the next breaking version.
36
+ - **The output hash.** `outputHash` gives the first 16 hex characters of the SHA-256 of the canonical JSON of an output. Each number goes to the grid of `RECORD_EPS` first.
32
37
  - **The tolerances.** `EPS` (`1e-6`) is for the float compares in an engine. `RECORD_EPS` (`1e-3`) is for the compares on a written file. A record writes the tolerance of each hard rule in its field `tolerance`. The defaults are `overlap` `0.001` and `through` `0.5`.
33
38
 
34
39
  ## An example
@@ -48,4 +53,4 @@ const placed = applyPack(input, output);
48
53
  const hard = packHard(input, output);
49
54
  ```
50
55
 
51
- The formats are in `docs/FORMAT.md` of `packing` and `docs/LAYOUT-RECORDS.md` of `highways`. The joint measures are in `docs/JOINT-MEASURES.md` of this repository, and the joint corpus is in `docs/JOINT-CORPUS.md`.
56
+ The formats are in `docs/FORMAT.md` of `packing` and `docs/LAYOUT-RECORDS.md` of `highways`. The joint measures are in `docs/JOINT-MEASURES.md` of this repository, and the joint corpus is in `docs/JOINT-CORPUS.md`. The promotion guards are in `docs/PROMOTION.md`. The portfolio and its pick rule are in `docs/PORTFOLIO.md`.
package/build/index.d.ts CHANGED
@@ -493,4 +493,194 @@ export declare const EDGE_STEP_VERSION = 1;
493
493
  * The rules of each shape are in `docs/JOINT-CORPUS.md`.
494
494
  */
495
495
  export declare function edgeStep(input: LayoutInput, params: EdgeStepParams, seed?: number): LayoutInput;
496
+ /**
497
+ * This function gives the SHA-256 digest of the UTF-8 bytes of a string, as 64 lowercase hex characters.
498
+ * It uses no API of Node or of the browser.
499
+ */
500
+ export declare function sha256Hex(text: string): string;
501
+ /**
502
+ * This function gives the canonical form of a value: sorted keys and no whitespace, with the numbers of `JSON.stringify`.
503
+ * A key with the value `undefined` is not in the form. An `undefined` in an array becomes `null`.
504
+ */
505
+ export declare function canonicalJson(value: unknown): string;
506
+ /** The options of `outputHash` and `documentHash`. */
507
+ export interface HashOptions {
508
+ /**
509
+ * The step of the grid of the numbers. The default is `RECORD_EPS`, so a number keeps 3 decimals.
510
+ * The value `0` keeps the exact numbers. A negative value or a value that is not finite causes a `RangeError`.
511
+ */
512
+ readonly grid?: number;
513
+ }
514
+ /**
515
+ * This function gives the hash of an output: the first 16 hex characters of the SHA-256 of its canonical form.
516
+ * Before the canonical form, each number goes to the nearest point of the grid, and `-0` becomes `0`.
517
+ * With the default grid, the rounding is `round3` of `packing`: `Math.round(x * 1000) / 1000`.
518
+ * The function throws a `RangeError` for `NaN` and for an infinite number.
519
+ *
520
+ * The grid can split two outputs. Two numbers near a rounding boundary can go to two different points.
521
+ * The grid can also merge two outputs whose numbers go to the same points. This merge is intentional: it removes the noise of floating-point numbers.
522
+ */
523
+ export declare function outputHash(value: unknown, options?: HashOptions): string;
524
+ /**
525
+ * This function gives the hash of a document. It uses the rule of `outputHash`, but the form does not include the field `hash` of the document.
526
+ * With the default grid, it is the input hash of `docs/FORMAT.md` of `packing`.
527
+ */
528
+ export declare function documentHash(doc: object, options?: HashOptions): string;
529
+ /** One output group: the candidates with the same output hash on each decision input. */
530
+ export interface OutputGroup {
531
+ /** The id of the group: its first member. */
532
+ readonly id: string;
533
+ /** The ids of the candidates of the group, in sorted order. */
534
+ readonly members: readonly string[];
535
+ }
536
+ /**
537
+ * This function gives the output groups of the candidates. The key of `hashes` is the id of a candidate.
538
+ * Its value is the list of the output hashes of the candidate, in the order of the decision inputs.
539
+ * Candidates with equal lists make one group. The groups are in the order of their ids.
540
+ * The function throws a `RangeError` when two lists have different lengths.
541
+ */
542
+ export declare function outputGroups(hashes: Readonly<Record<string, readonly string[]>>): OutputGroup[];
543
+ /** The evidence that a candidate is exercised on its decision inputs. */
544
+ export interface ExerciseEvidence {
545
+ /** The move counts of the candidate, by name. A record keeps each one as the trace measure `move.<name>`. */
546
+ readonly moves?: Readonly<Record<string, number>>;
547
+ /** The output hashes of the candidate, in the order of the decision inputs. */
548
+ readonly hashes?: readonly string[];
549
+ /** The output hashes of the base of the candidate, in the same order. */
550
+ readonly baseHashes?: readonly string[];
551
+ }
552
+ /**
553
+ * This function tells if a candidate is exercised. It gives `true` when a move count is more than 0.
554
+ * It also gives `true` when `hashes` and `baseHashes` are different at one place or more.
555
+ * Without evidence, it gives `false`.
556
+ * The function throws a `RangeError` when only one of the two lists is given, or when their lengths are different.
557
+ */
558
+ export declare function exercised(evidence: ExerciseEvidence): boolean;
559
+ /** The part of a `MeasureSpec` that a pick uses: the direction and the `minEffect`. */
560
+ export type PickSpec = Pick<MeasureSpec, "direction" | "minEffect">;
561
+ /** A member of a portfolio: a function with an id. A portfolio is also a member. */
562
+ export interface Member<I, O> {
563
+ readonly id: string;
564
+ /** This function gives the output of the member for an input. */
565
+ run(input: I): O;
566
+ }
567
+ /** One level of the key of a portfolio: a measure of an output. */
568
+ export interface PortfolioLevel<I, O> {
569
+ /** The id of the level. The id `hard` is reserved. */
570
+ readonly id: string;
571
+ readonly spec: PickSpec;
572
+ /** This function gives the value of the measure for the output of a member. The value must be finite. */
573
+ value(input: I, output: O): number;
574
+ }
575
+ /** The key of a portfolio: the hard level, then the other levels in order. */
576
+ export interface PortfolioKey<I, O> {
577
+ /** This function gives the count of hard breaks. It is level 0, with the direction `lower` and the `minEffect` 0. */
578
+ hard(input: I, output: O): number;
579
+ /** The levels after the hard level, in the order of the pick. */
580
+ readonly levels: readonly PortfolioLevel<I, O>[];
581
+ /** This function gives the hash of an output. The default is `outputHash` with the default grid. */
582
+ hash?(output: O): string;
583
+ }
584
+ /** The options of a portfolio. */
585
+ export interface PortfolioOptions {
586
+ /** The time limit in milliseconds, 0 or more. The first member always starts. A member that starts always finishes. */
587
+ readonly budgetMs?: number;
588
+ /** The largest count of members that run, a whole number of 1 or more. The other members are cut. */
589
+ readonly maxMembers?: number;
590
+ /** The clock in milliseconds. The default is `performance.now`, or `Date.now` without `performance`. */
591
+ readonly now?: () => number;
592
+ }
593
+ /** The status of a member in a pick. */
594
+ export type MemberStatus = "ran" | "cut" | "error";
595
+ /** The trace of one member in a pick. */
596
+ export interface MemberTrace {
597
+ readonly id: string;
598
+ readonly status: MemberStatus;
599
+ /** The value of each level, with the key `hard` for the hard level. Only a member with the status `ran` has values. */
600
+ readonly values?: Readonly<Record<string, number>>;
601
+ /** The time of the run of the member, in milliseconds. */
602
+ readonly ms?: number;
603
+ /** The hash of the output of the member. */
604
+ readonly outputHash?: string;
605
+ /** The message of the error of a member with the status `error`. */
606
+ readonly error?: string;
607
+ }
608
+ /** The trace of one pick of a portfolio. */
609
+ export interface PortfolioTrace {
610
+ /** One entry for each member, in the order of the members. A cut member is also in the list. */
611
+ readonly members: readonly MemberTrace[];
612
+ readonly winner: string;
613
+ /** The index of the winner in the list of the members. */
614
+ readonly winnerIndex: number;
615
+ /** The value `true` tells that the winner is not member 0 and has a different output hash. */
616
+ readonly picked: boolean;
617
+ /** The time of the full pick, in milliseconds. */
618
+ readonly totalMs: number;
619
+ readonly budgetMs?: number;
620
+ readonly maxMembers?: number;
621
+ /** The count of the cut members. */
622
+ readonly cut: number;
623
+ /** The value `false` tells that the time limit cut one member or more. Then a run on a different computer can give a different pick. */
624
+ readonly deterministic: boolean;
625
+ /** The ids of the members that stay in after each level of `selectBest`. The first list is for the hard level. */
626
+ readonly kept: readonly (readonly string[])[];
627
+ }
628
+ /** The result of one pick of a portfolio: the output of the winner, its id and the trace. */
629
+ export interface PortfolioPick<O> {
630
+ readonly output: O;
631
+ readonly winner: string;
632
+ readonly trace: PortfolioTrace;
633
+ }
634
+ /** A portfolio: a member that runs its members and gives the output of the best member. */
635
+ export interface Portfolio<I, O> extends Member<I, O> {
636
+ /** This function starts the members on an input and gives the output of the winner with the trace. */
637
+ pick(input: I): PortfolioPick<O>;
638
+ }
639
+ /** A candidate of `selectBest`: an id and the value of each level. */
640
+ export interface SelectCandidate {
641
+ readonly id: string;
642
+ readonly values: Readonly<Record<string, number>>;
643
+ }
644
+ /** A level of `selectBest`: the id of a value and its spec. */
645
+ export interface SelectLevel {
646
+ readonly id: string;
647
+ readonly spec: PickSpec;
648
+ }
649
+ /** The result of `selectBest`. */
650
+ export interface Selection {
651
+ readonly winner: string;
652
+ /** The ids of the candidates that stay in after each level, in the given order. */
653
+ readonly kept: readonly (readonly string[])[];
654
+ }
655
+ /**
656
+ * This function picks the best candidate. For each level, it finds the best value of the candidates that stay in.
657
+ * It keeps each candidate that is not worse than that best value by `compareMeasure`.
658
+ * The winner is the first candidate, in the given order, that stays in after the last level.
659
+ * Without levels, the winner is the first candidate and `kept` is empty.
660
+ *
661
+ * The reason for the rule: a scan that compares each candidate with the current winner is not transitive, because of the `minEffect` ties.
662
+ * Such a scan can drift away from the best value. An example: "a" is lower with the `minEffect` 0.005, and "b" is higher.
663
+ * The candidates A (0, 1), B (0.004, 2) and C (0.008, 3) give the winner B.
664
+ * The scan picks C, but A is better than C on "a".
665
+ *
666
+ * The function throws a `RangeError` for an empty list of candidates, for a missing value, and for a value that is not finite.
667
+ */
668
+ export declare function selectBest(candidates: readonly SelectCandidate[], levels: readonly SelectLevel[]): Selection;
669
+ /** This function gives the move `pick` of a pick: 1 when `picked` is true, else 0. A record keeps it as the trace measure `move.pick`. */
670
+ export declare function pickMoves(trace: Pick<PortfolioTrace, "picked">): {
671
+ pick: number;
672
+ };
673
+ /**
674
+ * This function makes a portfolio. Its `pick` starts the members in their order. `selectBest` picks the winner of the members with the status `ran`.
675
+ * The first level is the hard level, then the levels of the key follow.
676
+ * `members` is a list, or a function of the input that gives the list.
677
+ *
678
+ * A member that throws, or that gives a value that is not finite, gets the status `error`. It does not win.
679
+ * When each member has an error, `pick` throws the error of the first member.
680
+ * `docs/PORTFOLIO.md` tells the rules of the time limit, the trace and `picked`.
681
+ *
682
+ * The function throws a `RangeError` for a level with the id `hard`, for two levels with the same id and for a bad option.
683
+ * It also throws a `RangeError` for an empty list of members, or for two members with the same id.
684
+ */
685
+ export declare function portfolio<I, O>(id: string, members: readonly Member<I, O>[] | ((input: I) => readonly Member<I, O>[]), key: PortfolioKey<I, O>, options?: PortfolioOptions): Portfolio<I, O>;
496
686
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/geometry.ts","../src/tolerance.ts","../src/input.ts","../src/output.ts","../src/record.ts","../src/rules.ts","../src/turn.ts","../src/measures.ts","../src/strategy.ts","../src/random.ts","../src/edges.ts"],"mappings":";YACY;;qBAGC,gBAAgB;iBAEZ;WACN;WACA;;;iBAIM;WACN;WACA;WACA;WACA;;;iBAIM;WACN;WACA;WACA;WACA;;;;;;YAOC;WACG;WAAuB;WAAoB;WAAoB;WAAoB;;WAEnF;WACA;WACA;;WAEA;WAAyB;WAAqB;WAAqB;;WACnE;WAA0B;WAAqB;WAAqB;WAAqB;;;YAG5F,kBAAkB;;wBAGd,YAAY,QAAQ,qBAAqB;;wBAOzC,KAAK,MAAM,MAAM,QAAQ,qBAAqB;;wBAM9C,SAAS,QAAQ,SAAS;;wBAyB1B,UAAU,QAAQ,QAAQ,YAAY,aAAa;;;;;wBAoBnD,UAAU,GAAG,MAAM,GAAG;WAAkB;WAAoB;;;qBCtG/D;;;;;qBAMA;;;;;iBAMI;;WAEN;;WAEA;;;;;;qBAOE,mBAAmB;;;;;;iBCjBf;WACN;WACA,OAAO;WACP;WACA;;;iBAIM;WACN;WACA;WACA;;WAEA;WACA;;WAEA;;WAEA;WACA;WACA;;WAEA,QAAQ;WACR,iBAAiB;;WAEjB,SAAS;;WAET;;WAEA,OAAO,SAAS;;;YAIf,OAAO;;iBAGF;WACN;WACA;WACA;WACA;WACA;WACA,OAAO,SAAS;;;iBAIV;WACN;WACA;WACA;;WAEA;;WAEA;;WAEA,QAAQ;;WAER;;;iBAIM;WACN;WACA,QAAQ;WACR;aAAkB;;;;iBAIZ;WACN;WACA;WACA,QAAQ,SAAS;WACjB;;;iBAIM;WACN;WACA;WACA;WACA;WAC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oBAA+C,UAAS,gBAAqB;;;;;wBAiC9H,WAAW,OAAO;;wBCzSlB,SAAS,MAAM,OAAO;;wBAKtB,UAAU,WAAW,WAAW;;wBAKhC,SAAS,MAAM,MAAM,YAAY;;wBAWjC,WAAW,QAAQ,SAAS;;wBAO5B,WAAW,QAAQ,QAAQ,YAAY;;wBAkBvC,QAAQ,KAAK,YAAY;;YCtD7B;;;;;;iBAOK,YAAY;WAClB,IAAI;WACJ;WACA,WAAW;;WAEX;;WAEA;;WAEA;;WAEA;;WAEA;;;;;WAKA;aAAgC;;;WAEhC;;;YAIC;;qBAYC,yBAAyB,YAAY;;qBAarC;;YAGD;;;;;;wBAOI,YAAY,MAAM,KAAK,2BAA2B,YAAO;;;;;;wBAWzD,eAAe,mBAAmB,kBAAkB,MAAM,KAAK,0CAA0C;;;;;iBC1ExG,aAAa,aAAa,UAAU,WAAW;;WAErD;;WAEA;;WAEA;;WAEA,UAAU;;WAEV,UAAU;;WAEV;;;wBCjBK,WAAW;;wBAWX,QAAQ;;wBAoBR,WAAW,cAAc;;wBAKzB,UAAU,iBAAiB,YAAY;;;;;YC7B3C;;iBAGK;WACN;WACA,WAAW;;WAEX;;WAEA;;WAEA;;;qBAIE,cAAc,SAAS,OAAO;;qBAG9B;;;;;;wBAgBG,SAAS,OAAO,aAAa,QAAQ,gBAAgB,gBAAiC"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/geometry.ts","../src/tolerance.ts","../src/input.ts","../src/output.ts","../src/record.ts","../src/rules.ts","../src/turn.ts","../src/measures.ts","../src/strategy.ts","../src/random.ts","../src/edges.ts","../src/hash.ts","../src/portfolio.ts"],"mappings":";YACY;;qBAGC,gBAAgB;iBAEZ;WACN;WACA;;;iBAIM;WACN;WACA;WACA;WACA;;;iBAIM;WACN;WACA;WACA;WACA;;;;;;YAOC;WACG;WAAuB;WAAoB;WAAoB;WAAoB;;WAEnF;WACA;WACA;;WAEA;WAAyB;WAAqB;WAAqB;;WACnE;WAA0B;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