@mark1russell7/stack-endurance 0.8.30 → 0.8.31

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
@@ -148,11 +148,15 @@ Two groups of cuts that share no minimal set are independent, so the independent
148
148
  - The rank is by level, as the take order. It compares the sum of the changes of the first level, then of the next level, and so on. The largest sum comes first. Two equal inputs go in the order of their keys.
149
149
  - `chance` gives the chance that the draw gets its need through the event (`lasts` of `caseOutlook`), before and after the step. It also gives the values at the two ends of the sampling bands of the cuts, before and after the step. The change of the chance is the change of the point values.
150
150
  - `chance.interval` gives the 95% interval of the change (`ChanceInterval`: `se`, `low` and `high`). Since 0.8.27 (M2-sensitivity-interval).
151
- - The stop of the draw must use one cut (`stopCuts`). That cut must have sums (`Cut.sums` of the core) or counts (`Cut.counts`) with no fault. Else the interval is absent.
151
+ - Each cut that the stop of the draw uses (`stopCuts`) must have sums (`Cut.sums` of the core) or counts (`Cut.counts`) with no fault. Else the interval is absent.
152
152
  - Since 0.8.30, the sums give the interval with no counts. When a cut has good sums and good counts, the sums come first. The two give the same interval.
153
- - The change is a weighted sum of the chances of the Kaplan-Meier curve at up to four days. A read between two points of the curve has a weight on each point.
153
+ - With one cut, the change is a weighted sum of the chances of the Kaplan-Meier curve at up to four days. A read between two points of the curve has a weight on each point.
154
154
  - `survivalCombination` of rigor-statistics gives the Greenwood error of the sum. The covariance of the chances at two days `a <= b` is `S(a) * S(b) * V(a)`.
155
- - A stop of two or more cuts has no interval. Its event curve and upper curve are not smooth functions of the curves of the cuts. Its independent curve has a term for each state of the cuts.
155
+ - With two or more cuts, the curves of the stop are not smooth functions of the curves of the cuts. Thus the interval comes from a parametric bootstrap. Since 0.8.31.
156
+ - Each run of the bootstrap draws the curve of each cut (`survivalBootstrap` of rigor-statistics). Then it makes the event curve of the stop again (`stopRebuild`) and reads the change.
157
+ - This interval is for `change.event` only. `interval.runs` gives the count of runs. The option `runs` sets it, and the default is `SENSITIVITY_RUNS`, 1000.
158
+ - The seed is the hash of the case, the need and the input. Thus the same query gives the same interval.
159
+ - At a kink of the event curve, as for two cuts with equal curves, the coverage of the interval is near 89%, not 95%.
156
160
 
157
161
  An example on the sample:
158
162
 
package/build/index.d.ts CHANGED
@@ -433,6 +433,36 @@ export declare function stopCurves(caseCuts: CaseCuts, draw: Draw, options?: Sto
433
433
  * @throws RangeError for a bad `maxSets` or `maxWork`
434
434
  */
435
435
  export declare function stopCuts(caseCuts: CaseCuts, draw: Draw, options?: StopCurveOptions): readonly number[] | undefined;
436
+ /**
437
+ * The cuts of the stop of a draw, and a function that gives the curves of the stop for other curves of these cuts. Since 0.8.31.
438
+ * A parametric bootstrap draws the curve of each used cut, and `curvesWith` gives the curves of the stop of each draw.
439
+ */
440
+ export interface StopRebuild {
441
+ /** The cuts that the stop uses, as indexes in `caseCuts.cuts`: the result of `stopCuts`. */
442
+ readonly used: readonly number[];
443
+ /** The curves of the stop (`stopCurves`) with the curves of the cuts in the case. */
444
+ readonly curves: StopCurves;
445
+ /**
446
+ * This function gives the curves of the stop when each used cut has the curve at its place in `used`. Each other cut keeps its curve.
447
+ * The minimal sets, the budgets and the bound are those of `curves`. Each curve must be good for `checkEndurance`.
448
+ */
449
+ readonly curvesWith: (curves: readonly Survival[]) => StopCurves;
450
+ /** This function gives only the `event` curve of `curvesWith`. It does not calculate the other two curves, so it costs less. */
451
+ readonly eventWith: (curves: readonly Survival[]) => Survival;
452
+ }
453
+ /**
454
+ * This function gives the cuts of the stop of a draw and the curves of the stop for other curves of these cuts. Since 0.8.31.
455
+ *
456
+ * - The sets of cuts come from the needs and the parts of the case, not from the curves. Thus one search of the sets serves each call of `curvesWith`.
457
+ * - `curvesWith` uses the same functions as `stopCurves`: `eventStop`, `independentStop` and `upperStop`.
458
+ * - The result is `undefined` when `stopCurves` gives `undefined`.
459
+ *
460
+ * @param caseCuts - The case
461
+ * @param draw - The draw
462
+ * @param options - The stack or the parts that are also down, and the budgets: as for `stopCurves`
463
+ * @throws RangeError for a bad `maxSets` or `maxWork`
464
+ */
465
+ export declare function stopRebuild(caseCuts: CaseCuts, draw: Draw, options?: StopCurveOptions): StopRebuild | undefined;
436
466
  /** The shortfall of each level, in user-days, and the draws that the query cannot read. */
437
467
  export interface Shortfall {
438
468
  /**
@@ -727,23 +757,43 @@ export declare const SAMPLE_ENDURANCE_STACK: Stack;
727
757
  export declare const SAMPLE_ENDURANCE: EnduranceLayer;
728
758
  /** The default step of `enduranceSensitivity`: 1 unit of each input. */
729
759
  export declare const SENSITIVITY_STEP = 1;
730
- /** The options of `enduranceSensitivity`: the options of a case, the horizon of the chance, and the step. */
760
+ /**
761
+ * The default count of the runs of the bootstrap of the interval of a stop of two or more cuts (`SensitivityOptions.runs`). Since 0.8.31.
762
+ * One call on a test layer of one store, one draw and two cuts of 10 points each took approximately 40 ms at this default.
763
+ * The time is near the runs times the inputs whose step changes the days.
764
+ */
765
+ export declare const SENSITIVITY_RUNS = 1e3;
766
+ /** The options of `enduranceSensitivity`: the options of a case, the horizon of the chance, the step and the runs of the bootstrap. */
731
767
  export interface SensitivityOptions extends CaseOptions, ShortfallOptions {
732
768
  /** The step of each input, a number more than 0, in the unit of the input. The default is `SENSITIVITY_STEP`. */
733
769
  readonly step?: number | undefined;
770
+ /**
771
+ * The count of the runs of the bootstrap of the interval of a stop of two or more cuts, a whole number from 1. Since 0.8.31.
772
+ * The default is `SENSITIVITY_RUNS`. The cost of the interval of each draw and each input is near this count times one `eventStop`.
773
+ */
774
+ readonly runs?: number | undefined;
734
775
  }
735
776
  /** The kind of an input: the amount of a store, the rate of a draw, or a parameter of a converter. */
736
777
  export type SensitivityKind = "store" | "draw" | "converter";
737
778
  /**
738
- * The 95% interval of the change of the chance (`SensitivityChance.change`), from the sampling error of the curve of one cut. Since 0.8.27.
739
- * The ends are the change minus and plus `Z95` times `se`, clamped to 0 to 1, or to -1 to 0 for a change down.
740
- * It is a Wald interval. Near the ends of the range, its coverage can be less than 95%.
779
+ * The 95% interval of the change of the chance (`SensitivityChance.change`), from the sampling error of the curves of the cuts. Since 0.8.27.
780
+ *
781
+ * - With one cut, the ends are the change minus and plus `Z95` times `se`. It is a Wald interval.
782
+ * Near the ends of the range, its coverage can be less than 95%.
783
+ * - With two or more cuts, the ends come from a parametric bootstrap of the curves of the cuts (since 0.8.31). Refer to `enduranceSensitivity`.
784
+ * - The ends are clamped to 0 to 1, or to -1 to 0 for a change down.
741
785
  */
742
786
  export interface ChanceInterval {
743
- /** The Greenwood standard error of the change. It includes the covariance of the chances of the curve at the days before and after the step. */
787
+ /**
788
+ * The standard error of the change. With one cut, it is the Greenwood standard error.
789
+ * It includes the covariance of the chances of the curve at the days before and after the step.
790
+ * With two or more cuts, it is the width of the bootstrap interval before the clamp, divided by `2 * Z95`.
791
+ */
744
792
  readonly se: number;
745
793
  readonly low: number;
746
794
  readonly high: number;
795
+ /** The count of the runs of the bootstrap, for a stop of two or more cuts. With one cut, it is absent. Since 0.8.31. */
796
+ readonly runs?: number | undefined;
747
797
  }
748
798
  /**
749
799
  * The change in the chance that a draw gets its need through the event (`DrawOutlook.lasts`), for one input.
@@ -757,13 +807,14 @@ export interface SensitivityChance {
757
807
  /** The chance after the step minus the chance before it, for each curve. It is the change of the point values. */
758
808
  readonly change: CurveValues;
759
809
  /**
760
- * The 95% interval of `change`, when the stop of the draw uses one cut. Since 0.8.27.
761
- * That cut must have sums (`Cut.sums`) or counts (`Cut.counts`) with no fault.
762
- * With one cut, the three curves of the stop are the curve of the cut, so the three changes are equal.
763
- * Without sums and counts, the interval is also absent. Since 0.8.30, the sums give the interval with no counts.
810
+ * The 95% interval of `change.event`. Since 0.8.27.
811
+ * Each cut that the stop of the draw uses must have sums (`Cut.sums`) or counts (`Cut.counts`) with no fault.
812
+ * Without sums and counts, the interval is absent. Since 0.8.30, the sums give the interval with no counts.
764
813
  *
765
- * With two or more cuts, the interval is absent. The event curve and the upper curve are not smooth functions of the curves
766
- * of the cuts (a maximum, and a sum with a limit). The independent curve is a polynomial with a term for each state of the cuts.
814
+ * - With one cut, the three curves of the stop are the curve of the cut, so the three changes are equal.
815
+ * The interval comes from the delta method (`survivalCombination`).
816
+ * - With two or more cuts, the curves of the stop are not smooth functions of the curves of the cuts. Thus the delta method does not apply.
817
+ * The interval comes from a parametric bootstrap of the curves of the cuts (since 0.8.31). It is for `change.event` only.
767
818
  */
768
819
  readonly interval?: ChanceInterval | undefined;
769
820
  /** The values before the step at the two ends of the sampling bands of the cuts (`DrawOutlook.band`). */
@@ -836,10 +887,19 @@ export interface Sensitivity {
836
887
  * - The days are exact for the inputs. `chance` is the chance that a draw gets its need through the event. It comes
837
888
  * from `caseOutlook` with the share `take`, before and after the step, with the bands of the cuts. The change of the
838
889
  * chance is the change of the point values.
839
- * - The change has a 95% interval (`SensitivityChance.interval`) when the stop of the draw uses one cut (`stopCuts`) with sums or counts.
840
- * A stop of two or more cuts has no interval. A cut with no sums and no counts, or with only reads that have a fault, also has no interval.
841
- *
842
- * The cost is one `enduranceOf` and one `caseOutlook` for each input, and one `stopCuts` for each draw of the base. The function is pure.
890
+ * - The change has a 95% interval (`SensitivityChance.interval`) when each cut of the stop of the draw (`stopCuts`) has sums or counts.
891
+ * A cut with no sums and no counts, or with only reads that have a fault, gives no interval.
892
+ * - With one cut, the interval comes from the delta method of the Greenwood sums.
893
+ * - With two or more cuts, the interval comes from a parametric bootstrap of the curves of the cuts (`survivalBootstrap` of rigor-statistics).
894
+ * Each run draws each curve, makes the event curve of the stop from the drawn curves, and reads the change. The draws of the cuts are independent.
895
+ * - The bootstrap interval is for `change.event` only. The type has one interval, so the independent and upper curves have none.
896
+ * - The bootstrap is correct only for large samples. At a kink of the event curve, its coverage is less than 95%.
897
+ * An example is two cuts with equal curves under a maximum: the coverage of a percentile interval is near 0.89 there.
898
+ * - The seed of the bootstrap is the hash of the case, the need and the input. The same query gives the same interval.
899
+ *
900
+ * The cost is one `enduranceOf` and one `caseOutlook` for each input, and one `stopRebuild` for each draw of the base.
901
+ * With two or more cuts, the interval of each draw and each input adds `runs` draws of the curves and `runs` uses of `eventStop`.
902
+ * The function is pure.
843
903
  *
844
904
  * @param layer - The endurance layer
845
905
  * @param caseCuts - The case
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":["CutBound"],"sources":["../src/converter.ts","../src/supply.ts","../src/calendar.ts","../src/endurance.ts","../src/joint.ts","../src/best.ts","../src/shortfall.ts","../src/check.ts","../src/join.ts","../src/sample.ts","../src/sensitivity.ts","../src/buy.ts"],"mappings":";;;;;;wBAegB,SAAS,WAAW;;wBAwBpB,SAAS,WAAW;;wBAKpB,aAAa,WAAW;;wBAKxB,cAAc,YAAY,SAAS,aAAa;;wBAOhD,QAAQ,QAAQ,wCAAwC,aAAa;;wBCnDrE,WAAW,MAAM,MAAM,UAAU;;UAKhC;WACN;WACA;WACA;WACA;;;UAIM;;WAEN,OAAO;WACP,UAAU;;WAEV,eAAe;;WAEf;;WAEA,OAAO;;;wBCZF,QAAQ,OAAO,SAAS;;;;;wBASxB,WAAW,OAAO,SAAS;;iBCX1B;;WAEN,IAAI;;WAEJ,QAAQ;;WAER;;;;;;WAMA,QAAQ;;;;;;WAMR;;;qBAIE;;;;;wBAMG,YAAY,UAAU,UAAU,SAAS,KAAK,iCAAiC;;;;;;;wBAqB/E,aAAa,OAAO,gBAAgB,IAAI,SAAS,eAAc,sBAAkC;;;;;wBAejG,UAAU,OAAO,gBAAgB,UAAU,UAAU,cAAc,sBAAsB;;;;;;;;wBAyMzF,QAAQ,QAAQ,KAAK,wBAAwB,OAAO,SAAS;;;;;wBAqG7D,aAAa,OAAO,gBAAgB,cAAc,qBAAqB,SAAS,cAAc;;;;;;wBAkB9F,UAAU,OAAO,gBAAgB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA8C/C,YAAY,OAAO,gBAAgB,UAAU,UAAU,SAAS,cAAc;;iBC/a7E;WACN;WACA,IAAI;;;;;WAKJ;;WAEA;;WAEA;;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;WACA;WACA;;;;;;iBAOM;;WAEN,QAAQ;;WAER,OAAO;;WAEP,QAAQ;;;;;;;;;;WAUR,WAAW;;WAEX,aAAa;;WAEb,YAAY;;;iBAIN;WACN;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA,SAAS;;;iBAIH;;;;;WAKN;WACA,MAAM;;WAEN;;WAEA;;WAEA;;WAEA;;WAEA,gBAAgB;;WAEhB,QAAQ,SAAS;;;iBAIX;WACN;WACA,IAAI;;WAEJ;;WAEA,MAAM;;WAEN,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAqNZ,qBAAqB,OAAO,gBAAgB,UAAU,UAAU,SAAS,qBAAqB;;;;;;;iBCrT7F;;WAEN;;WAEA,QAAQ,SAAS;;;iBAIX;;WAEN;;;YAIC;;iBAGK;WACN;WACA,MAAM;WACN;WACA;;WAEA;;WAEA,SAAS,SAAS;;WAElB,WAAW,SAAS;;;iBAId;WACN;WACA,MAAM;WACN;WACA;;WAEA,SAAS,SAAS;WAClB,QAAQ;;;iBAIF;WACN;WACA,IAAI;;WAEJ;;WAEA,iBAAiB;;WAEjB,mBAAmB;;WAEnB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAgDK,cAAc,aAAa,aAAa,QAAQ,YAAY,SAAS,uBAAuB"}
1
+ {"version":3,"file":"index.d.ts","names":["CutBound"],"sources":["../src/converter.ts","../src/supply.ts","../src/calendar.ts","../src/endurance.ts","../src/joint.ts","../src/best.ts","../src/shortfall.ts","../src/check.ts","../src/join.ts","../src/sample.ts","../src/sensitivity.ts","../src/buy.ts"],"mappings":";;;;;;wBAegB,SAAS,WAAW;;wBAwBpB,SAAS,WAAW;;wBAKpB,aAAa,WAAW;;wBAKxB,cAAc,YAAY,SAAS,aAAa;;wBAOhD,QAAQ,QAAQ,wCAAwC,aAAa;;wBCnDrE,WAAW,MAAM,MAAM,UAAU;;UAKhC;WACN;WACA;WACA;WACA;;;UAIM;;WAEN,OAAO;WACP,UAAU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;;;;;;;;;;;;;;;;;;;;;;wBA4RZ,qBAAqB,OAAO,gBAAgB,UAAU,UAAU,SAAS,qBAAqB;;;;;;;iBCnZ7F;;WAEN;;WAEA,QAAQ,SAAS;;;iBAIX;;WAEN;;;YAIC;;iBAGK;WACN;WACA,MAAM;WACN;WACA;;WAEA;;WAEA,SAAS,SAAS;;WAElB,WAAW,SAAS;;;iBAId;WACN;WACA,MAAM;WACN;WACA;;WAEA,SAAS,SAAS;WAClB,QAAQ;;;iBAIF;WACN;WACA,IAAI;;WAEJ;;WAEA,iBAAiB;;WAEjB,mBAAmB;;WAEnB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAgDK,cAAc,aAAa,aAAa,QAAQ,YAAY,SAAS,uBAAuB"}
package/build/index.js CHANGED
@@ -4,7 +4,8 @@ import { DEFAULT_MAX_SETS, STACK_SCHEMA, countsFault, dateOfDay, dayNumber, need
4
4
  import { ONE, ZERO, add, div, equals, fromFloat, mul, neg, sign, sub, toNumber } from "@mark1russell7/rational";
5
5
  import { solveLexicographic } from "@mark1russell7/linear";
6
6
  import { pathSetReliability, stronglyConnectedComponents } from "@mark1russell7/collections/graph";
7
- import { Z95, greenwoodRead, kaplanMeier, survivalCombination } from "@mark1russell7/rigor-statistics";
7
+ import { canonicalJson, seedOf } from "@mark1russell7/rigor-generators";
8
+ import { Z95, greenwoodRead, kaplanMeier, survivalBootstrap, survivalCombination } from "@mark1russell7/rigor-statistics";
8
9
  // src/fit.ts
9
10
  /** The relative tolerance of a take and of a fit. */
10
11
  const TOLERANCE = 1e-13;
@@ -2550,23 +2551,35 @@ function stopReadWith(caseCuts, draw, options, stoppedOf) {
2550
2551
  const unsourced = given.flatMap((curve, index) => curve === void 0 ? [index] : []);
2551
2552
  if (unsourced.length > 0 && (sets === void 0 || sets.some((set) => set.some((index) => unsourced.includes(index))))) return void 0;
2552
2553
  const kept = given.flatMap((curve, index) => curve === void 0 ? [] : [index]);
2553
- const curves = kept.map((index) => given[index] ?? []);
2554
+ const base = kept.map((index) => given[index] ?? []);
2554
2555
  const keptStops = (cuts) => stops(cuts.map((index) => kept[index] ?? -1));
2555
2556
  const keptSets = sets?.map((set) => set.map((index) => kept.indexOf(index)));
2556
- const upper = upperStop(curves, keptSets);
2557
- const independent = independentStop(curves, keptSets, budgetsOf(options).maxWork);
2557
+ const { maxWork } = budgetsOf(options);
2558
2558
  const used = sets === void 0 ? kept : kept.filter((index) => sets.some((set) => set.includes(index)));
2559
2559
  const bound = weakestBound(used.map((index) => caseCuts.cuts[relevant[index] ?? -1]?.bound ?? "law"));
2560
- return {
2561
- curves: {
2560
+ const curvesOf = (curves) => {
2561
+ const upper = upperStop(curves, keptSets);
2562
+ const independent = independentStop(curves, keptSets, maxWork);
2563
+ return {
2562
2564
  event: eventStop(curves, keptStops),
2563
2565
  independent: independent ?? upper,
2564
2566
  upper,
2565
2567
  coarse: keptSets === void 0,
2566
2568
  independentUpper: independent === void 0,
2567
2569
  bound
2568
- },
2569
- used: used.map((index) => relevant[index] ?? -1)
2570
+ };
2571
+ };
2572
+ const places = used.map((index) => kept.indexOf(index));
2573
+ const changed = (curves) => {
2574
+ const out = [...base];
2575
+ for (const [at, place] of places.entries()) out[place] = curves[at] ?? base[place] ?? [];
2576
+ return out;
2577
+ };
2578
+ return {
2579
+ curves: curvesOf(base),
2580
+ used: used.map((index) => relevant[index] ?? -1),
2581
+ curvesWith: (curves) => curvesOf(changed(curves)),
2582
+ eventWith: (curves) => eventStop(changed(curves), keptStops)
2570
2583
  };
2571
2584
  }
2572
2585
  function stopCurvesWith(caseCuts, draw, options, stoppedOf) {
@@ -2605,6 +2618,22 @@ function stopCuts(caseCuts, draw, options = {}) {
2605
2618
  budgetsOf(options);
2606
2619
  return stopReadWith(caseCuts, draw, options, stoppedMemo(caseCuts, options))?.used;
2607
2620
  }
2621
+ /**
2622
+ * This function gives the cuts of the stop of a draw and the curves of the stop for other curves of these cuts. Since 0.8.31.
2623
+ *
2624
+ * - The sets of cuts come from the needs and the parts of the case, not from the curves. Thus one search of the sets serves each call of `curvesWith`.
2625
+ * - `curvesWith` uses the same functions as `stopCurves`: `eventStop`, `independentStop` and `upperStop`.
2626
+ * - The result is `undefined` when `stopCurves` gives `undefined`.
2627
+ *
2628
+ * @param caseCuts - The case
2629
+ * @param draw - The draw
2630
+ * @param options - The stack or the parts that are also down, and the budgets: as for `stopCurves`
2631
+ * @throws RangeError for a bad `maxSets` or `maxWork`
2632
+ */
2633
+ function stopRebuild(caseCuts, draw, options = {}) {
2634
+ budgetsOf(options);
2635
+ return stopReadWith(caseCuts, draw, options, stoppedMemo(caseCuts, options));
2636
+ }
2608
2637
  function zeroLevels(layer) {
2609
2638
  return Object.fromEntries(layer.levels.map((level) => [level, 0]));
2610
2639
  }
@@ -3132,6 +3161,12 @@ const SAMPLE_ENDURANCE = {
3132
3161
  // src/sensitivity.ts
3133
3162
  /** The default step of `enduranceSensitivity`: 1 unit of each input. */
3134
3163
  const SENSITIVITY_STEP = 1;
3164
+ /**
3165
+ * The default count of the runs of the bootstrap of the interval of a stop of two or more cuts (`SensitivityOptions.runs`). Since 0.8.31.
3166
+ * One call on a test layer of one store, one draw and two cuts of 10 points each took approximately 40 ms at this default.
3167
+ * The time is near the runs times the inputs whose step changes the days.
3168
+ */
3169
+ const SENSITIVITY_RUNS = 1e3;
3135
3170
  /** This function gives the size of a step down from a value. It is the step, or half the value when the value is not more than the step. */
3136
3171
  function stepDown(value, step) {
3137
3172
  return value > step ? step : value / 2;
@@ -3315,14 +3350,10 @@ function countsRead(counts) {
3315
3350
  return (day) => day > counts.last ? void 0 : greenwoodRead(estimate, day);
3316
3351
  }
3317
3352
  /**
3318
- * This function gives the curve of the one cut of the stop of a draw, when that cut has sums or counts with no fault.
3353
+ * This function gives the curve of one cut with the Greenwood reads of its estimate, when the cut has sums or counts with no fault.
3319
3354
  * The sums come first, because they are the short form. A cut with sums that have a fault uses its counts.
3320
3355
  */
3321
- function readCurveOf(layer, caseCuts, need, options) {
3322
- const draw = layer.draws.find((item) => item.need === need);
3323
- const used = draw === void 0 ? void 0 : stopCuts(caseCuts, draw, options);
3324
- if (used === void 0 || used.length !== 1) return void 0;
3325
- const cut = caseCuts.cuts[used[0] ?? -1];
3356
+ function readCurveOf(cut) {
3326
3357
  if (cut?.duration === void 0) return void 0;
3327
3358
  if (cut.sums !== void 0 && sumsFault(cut.duration, cut.sums) === void 0) return {
3328
3359
  curve: cut.duration,
@@ -3333,6 +3364,41 @@ function readCurveOf(layer, caseCuts, need, options) {
3333
3364
  read: countsRead(cut.counts)
3334
3365
  };
3335
3366
  }
3367
+ /** This function gives a Greenwood read at each point of the curve of a cut. The sums do not decrease, so a rounding below the sum before it is lifted. */
3368
+ function pointReads(curve) {
3369
+ let sum = 0;
3370
+ return curve.curve.map(([time, chance]) => {
3371
+ sum = Math.max(sum, (time > 0 ? curve.read(time)?.sum : void 0) ?? sum);
3372
+ return {
3373
+ time,
3374
+ chance,
3375
+ sum
3376
+ };
3377
+ });
3378
+ }
3379
+ /**
3380
+ * This function gives the reads of the stop of a draw, when each cut that the stop uses has sums or counts with no fault.
3381
+ * With one used cut, it gives the curve of that cut. With two or more used cuts, it gives the reads of each cut at the points of its curve.
3382
+ */
3383
+ function stopReadsOf(layer, caseCuts, need, options) {
3384
+ const draw = layer.draws.find((item) => item.need === need);
3385
+ const stop = draw === void 0 ? void 0 : stopRebuild(caseCuts, draw, options);
3386
+ if (stop === void 0 || stop.used.length === 0) return void 0;
3387
+ const curves = stop.used.map((index) => readCurveOf(caseCuts.cuts[index]));
3388
+ if (curves.some((curve) => curve === void 0)) return void 0;
3389
+ const [first] = curves;
3390
+ if (curves.length === 1 && first !== void 0) return {
3391
+ kind: "one",
3392
+ curve: first
3393
+ };
3394
+ return {
3395
+ kind: "many",
3396
+ cuts: {
3397
+ stop,
3398
+ reads: curves.map((curve) => curve === void 0 ? [] : pointReads(curve))
3399
+ }
3400
+ };
3401
+ }
3336
3402
  /**
3337
3403
  * This function gives the points of a curve and their weights in the read of `survivalAt` of the core at `days`.
3338
3404
  * Between two points, the read is linear, so it has a weight on each of the two points. After the last point, the read is 0.
@@ -3373,14 +3439,54 @@ function changeInterval(curve, before, after, horizon, change) {
3373
3439
  add(before, 1);
3374
3440
  add(after, -1);
3375
3441
  const { se } = survivalCombination(terms);
3376
- const [floor, ceiling] = (after >= horizon ? 1e400 : after) >= (before >= horizon ? 1e400 : before) ? [0, 1] : [-1, 0];
3377
- const clamp = (value) => Math.min(ceiling, Math.max(floor, value));
3442
+ const clamp = clampOf(before, after, horizon);
3378
3443
  return {
3379
3444
  se,
3380
3445
  low: clamp(change - Z95 * se),
3381
3446
  high: clamp(change + Z95 * se)
3382
3447
  };
3383
3448
  }
3449
+ /** This function clamps an end of an interval of a change to 0 to 1, or to -1 to 0 for a change down. A read at or after the horizon is the last read. */
3450
+ function clampOf(before, after, horizon) {
3451
+ const [floor, ceiling] = (after >= horizon ? 1e400 : after) >= (before >= horizon ? 1e400 : before) ? [0, 1] : [-1, 0];
3452
+ return (value) => Math.min(ceiling, Math.max(floor, value));
3453
+ }
3454
+ /**
3455
+ * This function gives the interval of the change of the chance of the event curve.
3456
+ * The interval comes from a parametric bootstrap of the curves of two or more cuts.
3457
+ *
3458
+ * - Each run draws the curve of each used cut with `survivalDraw` of rigor-statistics, at the points of its curve.
3459
+ * - The run makes the event curve of the stop from the drawn curves, with the same minimal sets (`StopRebuild.eventWith`).
3460
+ * - It reads the chance before and after the step as `caseOutlook` reads `lasts`. The statistic is the change.
3461
+ * - The interval is the percentile interval of `survivalBootstrap`, clamped as the interval of one cut.
3462
+ * - When the days do not change in the horizon, the change is 0 in each run. Then the interval is 0 to 0 with no runs.
3463
+ * - The seed is the hash of the case, the need and the input. Thus the same query gives the same interval.
3464
+ */
3465
+ function cutsChangeInterval(cuts, before, after, horizon, runs, seed) {
3466
+ if (before === after || before >= horizon && after >= horizon) return {
3467
+ se: 0,
3468
+ low: 0,
3469
+ high: 0,
3470
+ runs
3471
+ };
3472
+ const lasts = (curve, days) => days >= horizon ? 1 : 1 - survivalAt(curve, days);
3473
+ const statistic = (chances) => {
3474
+ const curves = cuts.reads.map((reads, k) => reads.map((read, at) => [read.time, chances[k]?.[at] ?? 0]));
3475
+ const event = cuts.stop.eventWith(curves);
3476
+ return lasts(event, after) - lasts(event, before);
3477
+ };
3478
+ const { low, high } = survivalBootstrap(cuts.reads, statistic, {
3479
+ runs,
3480
+ seed
3481
+ });
3482
+ const clamp = clampOf(before, after, horizon);
3483
+ return {
3484
+ se: (high - low) / (2 * Z95),
3485
+ low: clamp(low),
3486
+ high: clamp(high),
3487
+ runs
3488
+ };
3489
+ }
3384
3490
  /** This function compares two inputs for the rank: the sums of the levels in the order of the levels, the largest first, then the key. */
3385
3491
  function rankOrder$1(levels) {
3386
3492
  return (a, b) => {
@@ -3410,10 +3516,19 @@ function rankOrder$1(levels) {
3410
3516
  * - The days are exact for the inputs. `chance` is the chance that a draw gets its need through the event. It comes
3411
3517
  * from `caseOutlook` with the share `take`, before and after the step, with the bands of the cuts. The change of the
3412
3518
  * chance is the change of the point values.
3413
- * - The change has a 95% interval (`SensitivityChance.interval`) when the stop of the draw uses one cut (`stopCuts`) with sums or counts.
3414
- * A stop of two or more cuts has no interval. A cut with no sums and no counts, or with only reads that have a fault, also has no interval.
3519
+ * - The change has a 95% interval (`SensitivityChance.interval`) when each cut of the stop of the draw (`stopCuts`) has sums or counts.
3520
+ * A cut with no sums and no counts, or with only reads that have a fault, gives no interval.
3521
+ * - With one cut, the interval comes from the delta method of the Greenwood sums.
3522
+ * - With two or more cuts, the interval comes from a parametric bootstrap of the curves of the cuts (`survivalBootstrap` of rigor-statistics).
3523
+ * Each run draws each curve, makes the event curve of the stop from the drawn curves, and reads the change. The draws of the cuts are independent.
3524
+ * - The bootstrap interval is for `change.event` only. The type has one interval, so the independent and upper curves have none.
3525
+ * - The bootstrap is correct only for large samples. At a kink of the event curve, its coverage is less than 95%.
3526
+ * An example is two cuts with equal curves under a maximum: the coverage of a percentile interval is near 0.89 there.
3527
+ * - The seed of the bootstrap is the hash of the case, the need and the input. The same query gives the same interval.
3415
3528
  *
3416
- * The cost is one `enduranceOf` and one `caseOutlook` for each input, and one `stopCuts` for each draw of the base. The function is pure.
3529
+ * The cost is one `enduranceOf` and one `caseOutlook` for each input, and one `stopRebuild` for each draw of the base.
3530
+ * With two or more cuts, the interval of each draw and each input adds `runs` draws of the curves and `runs` uses of `eventStop`.
3531
+ * The function is pure.
3417
3532
  *
3418
3533
  * @param layer - The endurance layer
3419
3534
  * @param caseCuts - The case
@@ -3422,9 +3537,11 @@ function rankOrder$1(levels) {
3422
3537
  * @throws RangeError for a step that is not a finite number more than 0, and for the errors of `enduranceOf` and `caseOutlook`
3423
3538
  */
3424
3539
  function enduranceSensitivity(layer, caseCuts, options) {
3425
- const { step: given, ...caseOptions } = options;
3540
+ const { step: given, runs: givenRuns, ...caseOptions } = options;
3426
3541
  const step = given ?? 1;
3427
3542
  if (!(step > 0) || !Number.isFinite(step)) throw new RangeError(`The step ${String(given)} is not a finite number more than 0.`);
3543
+ const runs = givenRuns ?? 1e3;
3544
+ if (!Number.isInteger(runs) || runs < 1) throw new RangeError(`The option runs is ${String(givenRuns)}: it is not a whole number from 1.`);
3428
3545
  const base = enduranceOf(layer, caseCuts, caseOptions);
3429
3546
  const outlookOf = (changed) => new Map(caseOutlook(changed, caseCuts, {
3430
3547
  ...caseOptions,
@@ -3432,7 +3549,7 @@ function enduranceSensitivity(layer, caseCuts, options) {
3432
3549
  }).draws.map((draw) => [draw.need, draw]));
3433
3550
  const baseOutlook = outlookOf(layer);
3434
3551
  const counted = new Map([...baseOutlook.keys()].flatMap((need) => {
3435
- const read = readCurveOf(layer, caseCuts, need, caseOptions);
3552
+ const read = stopReadsOf(layer, caseCuts, need, caseOptions);
3436
3553
  return read === void 0 ? [] : [[need, read]];
3437
3554
  }));
3438
3555
  const horizon = caseOptions.horizon ?? 1e400;
@@ -3451,7 +3568,11 @@ function enduranceSensitivity(layer, caseCuts, options) {
3451
3568
  const to = outlook?.get(need);
3452
3569
  const read = counted.get(need);
3453
3570
  const moved = from === void 0 || to === void 0 ? void 0 : minus(to.lasts, from.lasts);
3454
- const interval = read === void 0 || from === void 0 || to === void 0 || moved === void 0 ? void 0 : changeInterval(read, from.days, to.days, horizon, moved.event);
3571
+ const interval = read === void 0 || from === void 0 || to === void 0 || moved === void 0 ? void 0 : read.kind === "one" ? changeInterval(read.curve, from.days, to.days, horizon, moved.event) : cutsChangeInterval(read.cuts, from.days, to.days, horizon, runs, seedOf(canonicalJson([
3572
+ caseCuts.case,
3573
+ need,
3574
+ variant.id
3575
+ ])));
3455
3576
  const chance = from === void 0 || to === void 0 || moved === void 0 ? {} : { chance: {
3456
3577
  before: from.lasts,
3457
3578
  after: to.lasts,
@@ -3583,6 +3704,6 @@ function daysPerDollar(sensitivity, prices, options) {
3583
3704
  unused
3584
3705
  };
3585
3706
  }
3586
- export { ENDURANCE_CODES, ENDURANCE_SCHEMA, INDEPENDENT_MAX_WORK, INDEPENDENT_TOLERANCE, MINIMAL_STOP_CUTS, SAMPLE_ENDURANCE, SAMPLE_ENDURANCE_STACK, SEASON_HORIZON_DAYS, SENSITIVITY_STEP, SHARES, YEAR_STARTS, bestEndurance, caseDraws, caseOutlook, caseShortfall, caseStopped, checkEndurance, curveFault, daysPerDollar, drawDemand, enduranceOf, enduranceSensitivity, eventStop, giftNeed, giftResource, hasEnduranceError, hasSeason, heldTail, independentStop, isSource, joinEndurance, jointDays, longestStop, minimalStops, monthEdges, monthOf, monthlyShares, seasonSupply, shareOf, sowDays, stopCurves, stopCuts, storeAmounts, survivalAt, survivalQuantile, tailDays, upperStop, yearChance, yearRate, yearShortfall };
3707
+ export { ENDURANCE_CODES, ENDURANCE_SCHEMA, INDEPENDENT_MAX_WORK, INDEPENDENT_TOLERANCE, MINIMAL_STOP_CUTS, SAMPLE_ENDURANCE, SAMPLE_ENDURANCE_STACK, SEASON_HORIZON_DAYS, SENSITIVITY_RUNS, SENSITIVITY_STEP, SHARES, YEAR_STARTS, bestEndurance, caseDraws, caseOutlook, caseShortfall, caseStopped, checkEndurance, curveFault, daysPerDollar, drawDemand, enduranceOf, enduranceSensitivity, eventStop, giftNeed, giftResource, hasEnduranceError, hasSeason, heldTail, independentStop, isSource, joinEndurance, jointDays, longestStop, minimalStops, monthEdges, monthOf, monthlyShares, seasonSupply, shareOf, sowDays, stopCurves, stopCuts, stopRebuild, storeAmounts, survivalAt, survivalQuantile, tailDays, upperStop, yearChance, yearRate, yearShortfall };
3587
3708
 
3588
3709
  //# sourceMappingURL=index.js.map