@mark1russell7/rigor-bench 0.2.18 → 0.2.20
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 +17 -0
- package/build/fresh.d.ts +1 -1
- package/build/index.d.ts +55 -2
- package/build/index.d.ts.map +1 -1
- package/build/index.js +72 -2
- package/build/index.js.map +1 -1
- package/build/paired.d.ts +22 -1
- package/build/paired.d.ts.map +1 -1
- package/build/paired.js +34 -1
- package/build/paired.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -37,6 +37,7 @@ v.comparison; // the cases that gain and dro
|
|
|
37
37
|
| `armOrder(arms, round)` | The order of any count of arms in a round. Each pair of arms has each order within 1 after each count of rounds. |
|
|
38
38
|
| `checkPairedTime(record)` | The record, or a `RangeError` for a time that is not a finite number above 0. |
|
|
39
39
|
| `caseRatios(records)` | The ratio of each case. It refuses 2 records of one round, and an order that did not turn. |
|
|
40
|
+
| `orderSize(records)` | The count of records per first arm, the order effect, and the amount that unequal counts can move a mean. This size is a guide, because a verdict reads a median. |
|
|
40
41
|
| `aaBand(aa, options)` | The band of the A/A arm, symmetric on a log scale. The kind `median` (the default) holds the A/A median, and the kind `case` holds one A/A case. It needs 5 cases or more. |
|
|
41
42
|
| `timeVerdict(candidate, aa, options)` | The outcome of the rule `difference` (the default) or `band`. |
|
|
42
43
|
| `verdictMargin(options)` | The margin of the rule `difference` on a log scale: the larger of `margin` and the noise of the pooled band. An interval in `[exp(-margin), exp(margin)]` is `same`. |
|
|
@@ -343,6 +344,22 @@ Each finding fails a gate, and each one carries its tests with `n`, `ties`, `p`
|
|
|
343
344
|
|
|
344
345
|
`winClaim(check, measure, entry, stratum)` gives `alone`, `show`, `likeControl`, `censored` and `open`. The fields are about this entry. The field `likeControl` is true when this entry does not beat a control on the measure and beats it on no partner. A win by another entry clears nothing. The field `alone` is true only when this entry itself beats each control on the measure, so a measure with no control is not `alone`.
|
|
345
346
|
|
|
347
|
+
`jointClaim(check, measures, entry, stratum)` reads a set of measures together, because one measure cannot call a win when each control wins a measure and loses a partner:
|
|
348
|
+
|
|
349
|
+
```ts
|
|
350
|
+
const joint = jointClaim(check, ["fill", "order"], "my-entry");
|
|
351
|
+
joint.verdict; // "survives", "dominated", "not-ahead" or "no-read"
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
| Verdict | Meaning |
|
|
355
|
+
| --- | --- |
|
|
356
|
+
| `survives` | No control dominates the entry, and the entry beats at least one control on each measure. |
|
|
357
|
+
| `dominated` | A control beats the entry on at least one measure, and the entry beats that control on none. The field `dominatedBy` names it. |
|
|
358
|
+
| `not-ahead` | The entry beats no control on a measure with each read made. The field `notAhead` names it. |
|
|
359
|
+
| `no-read` | A test with too few keys, or a measure with no control, decides the claim. This verdict is not a pass. |
|
|
360
|
+
|
|
361
|
+
A tie does not clear a control, and the win of another entry gives this entry no credit. The function adds no test: it reads the tests of `checkMeasures`, with their Holm families.
|
|
362
|
+
|
|
346
363
|
## The fresh runner
|
|
347
364
|
|
|
348
365
|
The entry `@mark1russell7/rigor-bench/fresh` starts child processes, so it is for Node only. The root entry stays free of `node:child_process`.
|
package/build/fresh.d.ts
CHANGED
package/build/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as armOrder, c as firstArm, i as PairedTime, l as orderSize, n as CaseRatio, o as caseRatios, r as OrderSize, s as checkPairedTime, t as Arm } from "./paired.js";
|
|
2
2
|
import { BootstrapOptions, Comparison as Comparison$1, Interval, TwoSamplePermutationOptions } from "@mark1russell7/rigor-statistics";
|
|
3
3
|
/** One value of one build on one case. The value is finite and 0 or more. */
|
|
4
4
|
interface BudgetRound {
|
|
@@ -1218,6 +1218,49 @@ interface WinClaim {
|
|
|
1218
1218
|
/** The reason and the date, for a measure with no control. */
|
|
1219
1219
|
readonly open: NoControl | undefined;
|
|
1220
1220
|
}
|
|
1221
|
+
/** The read of one control over the set of measures of a joint claim. */
|
|
1222
|
+
interface JointControl {
|
|
1223
|
+
readonly control: string;
|
|
1224
|
+
/** The measures where the entry beats this control. */
|
|
1225
|
+
readonly beaten: readonly string[];
|
|
1226
|
+
/** The measures where this control beats the entry. */
|
|
1227
|
+
readonly lostTo: readonly string[];
|
|
1228
|
+
/** The measures with no read of the entry and this control: no test, or too few keys. A tie on enough keys is a read and does not count here. */
|
|
1229
|
+
readonly unread: readonly string[];
|
|
1230
|
+
/** This field is true when no measure is unread and the entry beats this control on none. This control also beats the entry on at least one. */
|
|
1231
|
+
readonly dominates: boolean;
|
|
1232
|
+
}
|
|
1233
|
+
/** The read of one measure of a joint claim. */
|
|
1234
|
+
interface JointMeasure {
|
|
1235
|
+
readonly measure: string;
|
|
1236
|
+
/** The controls that the entry beats on this measure, each by its own test. */
|
|
1237
|
+
readonly beats: readonly string[];
|
|
1238
|
+
/** The controls in `beats` that also pass the level divided by the count of controls on this measure. Only these count for `survives`. */
|
|
1239
|
+
readonly clears: readonly string[];
|
|
1240
|
+
/** The controls that tie the entry on this measure: enough shared keys, and too few keys that differ. */
|
|
1241
|
+
readonly tied: readonly string[];
|
|
1242
|
+
/** The controls of the set with no read on this measure: no test, or too few keys. A measure with no test lists each control of the set. */
|
|
1243
|
+
readonly unread: readonly string[];
|
|
1244
|
+
}
|
|
1245
|
+
/**
|
|
1246
|
+
* The verdict of a joint claim. `dominated`: a control dominates the entry. `not-ahead`: on a measure with each read made, the entry beats no control.
|
|
1247
|
+
* `no-read`: a read that is not there decides the claim, and that is not a pass. `survives`: no control dominates the entry, and the entry clears a control on each measure.
|
|
1248
|
+
*/
|
|
1249
|
+
type JointVerdict = "survives" | "dominated" | "not-ahead" | "no-read";
|
|
1250
|
+
/** What one real entry earned on a set of measures taken together. */
|
|
1251
|
+
interface JointClaim {
|
|
1252
|
+
readonly entry: string;
|
|
1253
|
+
readonly stratum: string | undefined;
|
|
1254
|
+
readonly verdict: JointVerdict;
|
|
1255
|
+
/** The controls that dominate the entry. */
|
|
1256
|
+
readonly dominatedBy: readonly string[];
|
|
1257
|
+
/** The controls with each test read, where neither side beats the other on any measure. The entry earned nothing over them, so a page shows this list. */
|
|
1258
|
+
readonly equalledBy: readonly string[];
|
|
1259
|
+
/** The measures where the entry clears no control. */
|
|
1260
|
+
readonly notAhead: readonly string[];
|
|
1261
|
+
readonly controls: readonly JointControl[];
|
|
1262
|
+
readonly measures: readonly JointMeasure[];
|
|
1263
|
+
}
|
|
1221
1264
|
/**
|
|
1222
1265
|
* This function reads the controls and the spread of each measure of a bench.
|
|
1223
1266
|
*
|
|
@@ -1242,6 +1285,16 @@ export declare function checkMeasures(rows: readonly MeasureRow[], options: Meas
|
|
|
1242
1285
|
* The function throws a `RangeError` for a measure with no read and for an entry that the rows do not hold.
|
|
1243
1286
|
*/
|
|
1244
1287
|
export declare function winClaim(check: MeasureChecks, measure: string, entry: string, stratum?: string): WinClaim;
|
|
1288
|
+
/**
|
|
1289
|
+
* This function tells what one real entry earned on a set of measures taken together. Each win of a control loses a partner, so one measure cannot call a win.
|
|
1290
|
+
* A control dominates the entry when the entry beats it on no measure of the set, and it beats the entry on at least one. A tie does not clear a control.
|
|
1291
|
+
* The entry survives when no control dominates it and it clears at least one control on each measure. The function adds no test: it reads the tests of `check`.
|
|
1292
|
+
* One win over any control is enough on a measure, so a beat clears only at the level divided by the count of controls there.
|
|
1293
|
+
* All measures must hold, so the measures add no division. Dominance reads the plain tests, because that is the cautious direction.
|
|
1294
|
+
* With a stratum, the function reads that stratum. Without one, it reads the rows with no stratum.
|
|
1295
|
+
* The function throws a `RangeError` for an empty set, a repeat, a measure with no rule and an entry that the rows do not hold.
|
|
1296
|
+
*/
|
|
1297
|
+
export declare function jointClaim(check: MeasureChecks, measures: readonly string[], entry: string, stratum?: string): JointClaim;
|
|
1245
1298
|
/** The options of a power test. */
|
|
1246
1299
|
interface PowerOptions {
|
|
1247
1300
|
/** The count of the cases of the candidate and of the A/A arm. */
|
|
@@ -1304,5 +1357,5 @@ interface Rounds {
|
|
|
1304
1357
|
* keeps the work.
|
|
1305
1358
|
*/
|
|
1306
1359
|
export declare function timeRounds(arms: Readonly<Record<Arm, () => number>>, options: RoundsOptions): Rounds;
|
|
1307
|
-
export { type Arm, type ArmModels, type ArmPair, type Balanced, type Band, type BandKind, type BandOptions, type BudgetLook, type BudgetLooksOptions, type BudgetLooksVerdict, type BudgetMore, type BudgetOptions, type BudgetOutcome, type BudgetResult, type BudgetRound, type BudgetVerdict, type CaseBudget, type CaseGate, type CaseInterval, type CaseLimit, type CaseRatio, type CaseTail, type CaseTailLimit, type Comparison, type ControlFactors, type ControlOptions, type ControlRead, type ControlRow, type EntryCount, type Gate, type GateCaseOutcome, type GateJobRead, type GateOutcome, type GroupCounts, type GroupFactor, type GuardRead, type JobLimitVerdict, type JobRecords, type JobVerdict, type Ladder, type LadderDimension, type LadderOptions, type LadderVerdict, type LimitOnModel, type LimitOptions, type LimitOutcome, type LimitVerdict, type MeasureCheck, type MeasureCheckOptions, type MeasureChecks, type MeasureFinding, type MeasureFindingKind, type MeasureRow, type MeasureRule, type MeasuredFactor, type MedianBudget, type ModelLimits, type ModelRead, type ModelRow, type ModelStatus, type ModelTest, type ModelTestOptions, type NoControl, type NoFactor, type NoiseCheck, type NotSlowerOptions, type NotSlowerRead, type NotSlowerVerdict, type PairedTime, type PartnerRead, type PoolFacts, type PoolOptions, type PooledJob, type PooledLimitVerdict, type PooledRecords, type PooledVerdict, type Power, type PowerOptions, type QuantileBudget, type RateBudget, type Rounds, type RoundsOptions, type RunPairs, type Rung, type RungBudget, type RungEvidence, type RungRecord, type RungVerdict, type SpreadRead, type TailFalseFails, type TailGainCase, type TailLimit, type TailLimitOptions, type TailLimitVerdict, type TailRuleOptions, type TimeOutcome, type TimeVerdict, type VerdictOptions, type VerdictRule, type VisibleShift, type WinClaim, type WorstBudget, armOrder, caseRatios, checkPairedTime, firstArm };
|
|
1360
|
+
export { type Arm, type ArmModels, type ArmPair, type Balanced, type Band, type BandKind, type BandOptions, type BudgetLook, type BudgetLooksOptions, type BudgetLooksVerdict, type BudgetMore, type BudgetOptions, type BudgetOutcome, type BudgetResult, type BudgetRound, type BudgetVerdict, type CaseBudget, type CaseGate, type CaseInterval, type CaseLimit, type CaseRatio, type CaseTail, type CaseTailLimit, type Comparison, type ControlFactors, type ControlOptions, type ControlRead, type ControlRow, type EntryCount, type Gate, type GateCaseOutcome, type GateJobRead, type GateOutcome, type GroupCounts, type GroupFactor, type GuardRead, type JobLimitVerdict, type JobRecords, type JobVerdict, type JointClaim, type JointControl, type JointMeasure, type JointVerdict, type Ladder, type LadderDimension, type LadderOptions, type LadderVerdict, type LimitOnModel, type LimitOptions, type LimitOutcome, type LimitVerdict, type MeasureCheck, type MeasureCheckOptions, type MeasureChecks, type MeasureFinding, type MeasureFindingKind, type MeasureRow, type MeasureRule, type MeasuredFactor, type MedianBudget, type ModelLimits, type ModelRead, type ModelRow, type ModelStatus, type ModelTest, type ModelTestOptions, type NoControl, type NoFactor, type NoiseCheck, type NotSlowerOptions, type NotSlowerRead, type NotSlowerVerdict, type OrderSize, type PairedTime, type PartnerRead, type PoolFacts, type PoolOptions, type PooledJob, type PooledLimitVerdict, type PooledRecords, type PooledVerdict, type Power, type PowerOptions, type QuantileBudget, type RateBudget, type Rounds, type RoundsOptions, type RunPairs, type Rung, type RungBudget, type RungEvidence, type RungRecord, type RungVerdict, type SpreadRead, type TailFalseFails, type TailGainCase, type TailLimit, type TailLimitOptions, type TailLimitVerdict, type TailRuleOptions, type TimeOutcome, type TimeVerdict, type VerdictOptions, type VerdictRule, type VisibleShift, type WinClaim, type WorstBudget, armOrder, caseRatios, checkPairedTime, firstArm, orderSize };
|
|
1308
1361
|
//# sourceMappingURL=index.d.ts.map
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":["Comparison"],"sources":["../src/budget.ts","../src/verdict.ts","../src/limit.ts","../src/merge.ts","../src/gate.ts","../src/control.ts","../src/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eAAe,aAAa,cAAc,SAAS,kBAAkB;;UC9KpE;;WAEN;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;;UAIM;;WAEN;;WAEA;;;UAIM;WACN;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA,YAAY;;;UAIN;WACN,gBAAgB;;WAEhB;;WAEA;;WAEA;;;UAIM;WACN;WACA;WACA;;WAEA;;WAEA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;;UAIM;WACN;WACA;WACA;;;;;WAKA;;WAEA;;WAEA,sBAAsB;;WAEtB;;WAEA;;WAEA,kBAAkB;;;UAIZ;WACN;WACA;WACA;WACA;;;UAIM;WACN;;WAEA;;WAEA;;WAEA;;WAEA;;;UAIM;WACN;;;;;WAKA;;;UAIM;WACN;WACA;WACA,QAAQ;WACR,mBAAmB;;;UAIb;WACN;WACA;;WAEA;;WAEA;;WAEA;WACA,iBAAiB;WACjB,iBAAiB;WACjB,kBAAkB;;WAElB;;WAEA,MAAM;;;KAIL;;UAGK;WACN,MAAM;WACN;WACA;WACA;;WAEA;;WAEA;;WAEA,sBAAsB;;;UAIhB;;WAEN;WACA,mBAAmB;;WAEnB,gBAAgB;WAChB,mBAAmB;;;UAIb;;WAEN;;WAEA;;WAEA;;WAEA;aAAqB;aAAwB;eAA8B;eAA0B;;;;WAErG,MAAM;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":["Comparison"],"sources":["../src/budget.ts","../src/verdict.ts","../src/limit.ts","../src/merge.ts","../src/gate.ts","../src/control.ts","../src/ladder.ts","../src/model.ts","../src/tail.ts","../src/measures.ts","../src/power.ts","../src/rounds.ts"],"mappings":";;;UAQiB;;WAEN;;WAEA;WACA;;;KAIC;;UAGK;;WAEN;;WAEA;;WAEA;;;UAIM;WACN;;WAEA;;WAEA;WACA;;WAEA;;WAEA;;WAEA;WACA;;WAEA;WACA,SAAS;;WAET;;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AEA;;;;;;;wBAQK,WAAW,MAAM,SAAS,OAAO,qBAAqB,SAAS,gBAAgB"}
|
package/build/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as firstArm, n as caseRatios, r as checkPairedTime, t as armOrder } from "./paired.js";
|
|
1
|
+
import { a as orderSize, i as firstArm, n as caseRatios, r as checkPairedTime, t as armOrder } from "./paired.js";
|
|
2
2
|
import { bootstrapMedian, bootstrapTwo, compareRatios, holm, median, medianInterval, partialConjunction, quantile, quantileInterval, quantileSamples, signTest, signTestPower, twoSamplePermutation, wilson } from "@mark1russell7/rigor-statistics";
|
|
3
3
|
import { random } from "@mark1russell7/rigor-generators";
|
|
4
4
|
// src/budget.ts
|
|
@@ -2153,6 +2153,76 @@ function winClaim(check, measure, entry, stratum) {
|
|
|
2153
2153
|
open: read.open
|
|
2154
2154
|
};
|
|
2155
2155
|
}
|
|
2156
|
+
/**
|
|
2157
|
+
* This function tells what one real entry earned on a set of measures taken together. Each win of a control loses a partner, so one measure cannot call a win.
|
|
2158
|
+
* A control dominates the entry when the entry beats it on no measure of the set, and it beats the entry on at least one. A tie does not clear a control.
|
|
2159
|
+
* The entry survives when no control dominates it and it clears at least one control on each measure. The function adds no test: it reads the tests of `check`.
|
|
2160
|
+
* One win over any control is enough on a measure, so a beat clears only at the level divided by the count of controls there.
|
|
2161
|
+
* All measures must hold, so the measures add no division. Dominance reads the plain tests, because that is the cautious direction.
|
|
2162
|
+
* With a stratum, the function reads that stratum. Without one, it reads the rows with no stratum.
|
|
2163
|
+
* The function throws a `RangeError` for an empty set, a repeat, a measure with no rule and an entry that the rows do not hold.
|
|
2164
|
+
*/
|
|
2165
|
+
function jointClaim(check, measures, entry, stratum) {
|
|
2166
|
+
if (measures.length === 0) throw new RangeError("jointClaim: the set of measures is empty.");
|
|
2167
|
+
if (new Set(measures).size !== measures.length) throw new RangeError("jointClaim: the set of measures has a repeat.");
|
|
2168
|
+
for (const measure of measures) {
|
|
2169
|
+
const read = check.measures.find((m) => m.measure === measure);
|
|
2170
|
+
if (read === void 0) throw new RangeError(`jointClaim: the measure ${JSON.stringify(measure)} has no rule.`);
|
|
2171
|
+
if (!read.mixed && !read.entries.some((c) => c.group === entry && c.stratum === stratum)) throw new RangeError(`jointClaim: the entry ${JSON.stringify(entry)} has no rows on ${JSON.stringify(measure)}${stratumText(stratum)}.`);
|
|
2172
|
+
}
|
|
2173
|
+
const reads = check.reads.filter((r) => r.stratum === stratum && measures.includes(r.measure));
|
|
2174
|
+
const names = [...new Set(reads.map((r) => r.control))];
|
|
2175
|
+
const testOf = (measure, control) => {
|
|
2176
|
+
const read = reads.find((r) => r.measure === measure && r.control === control);
|
|
2177
|
+
return {
|
|
2178
|
+
mine: read?.comparisons.find((c) => c.better === entry),
|
|
2179
|
+
theirs: read?.against.find((c) => c.other === entry)
|
|
2180
|
+
};
|
|
2181
|
+
};
|
|
2182
|
+
const noRead = (test) => test === void 0 || unread(test);
|
|
2183
|
+
const testsOn = (measure) => names.flatMap((c) => {
|
|
2184
|
+
const mine = testOf(measure, c).mine;
|
|
2185
|
+
return mine === void 0 ? [] : [[c, mine]];
|
|
2186
|
+
});
|
|
2187
|
+
const hasPower = (test, tests) => test.shared >= pairsNeeded(check.alpha / (test.family * tests), 1);
|
|
2188
|
+
const controls = names.map((control) => {
|
|
2189
|
+
const beaten = measures.filter((m) => testOf(m, control).mine?.beats === true);
|
|
2190
|
+
const lostTo = measures.filter((m) => testOf(m, control).theirs?.beats === true);
|
|
2191
|
+
const missing = measures.filter((m) => noRead(testOf(m, control).mine));
|
|
2192
|
+
return {
|
|
2193
|
+
control,
|
|
2194
|
+
beaten,
|
|
2195
|
+
lostTo,
|
|
2196
|
+
unread: missing,
|
|
2197
|
+
dominates: beaten.length === 0 && lostTo.length > 0 && missing.length === 0
|
|
2198
|
+
};
|
|
2199
|
+
});
|
|
2200
|
+
const measureReads = measures.map((measure) => ({
|
|
2201
|
+
measure,
|
|
2202
|
+
beats: names.filter((c) => testOf(measure, c).mine?.beats === true),
|
|
2203
|
+
clears: testsOn(measure).filter(([, test]) => clearsPartner(test, testsOn(measure).length, check.alpha)).map(([c]) => c),
|
|
2204
|
+
tied: names.filter((c) => testOf(measure, c).mine?.tied === true),
|
|
2205
|
+
unread: names.filter((c) => noRead(testOf(measure, c).mine))
|
|
2206
|
+
}));
|
|
2207
|
+
const dominatedBy = controls.filter((c) => c.dominates).map((c) => c.control);
|
|
2208
|
+
const equalledBy = controls.filter((c) => c.beaten.length === 0 && c.lostTo.length === 0 && c.unread.length === 0).map((c) => c.control);
|
|
2209
|
+
const notAhead = measureReads.filter((m) => m.clears.length === 0).map((m) => m.measure);
|
|
2210
|
+
const closed = measureReads.some((m) => {
|
|
2211
|
+
const tests = testsOn(m.measure);
|
|
2212
|
+
return m.clears.length === 0 && m.unread.length === 0 && tests.length > 0 && tests.every(([, test]) => hasPower(test, tests.length));
|
|
2213
|
+
});
|
|
2214
|
+
const undecided = controls.some((c) => c.beaten.length === 0 && c.lostTo.length > 0 && c.unread.length > 0);
|
|
2215
|
+
return {
|
|
2216
|
+
entry,
|
|
2217
|
+
stratum,
|
|
2218
|
+
verdict: dominatedBy.length > 0 ? "dominated" : closed ? "not-ahead" : notAhead.length > 0 || undecided ? "no-read" : "survives",
|
|
2219
|
+
dominatedBy,
|
|
2220
|
+
equalledBy,
|
|
2221
|
+
notAhead,
|
|
2222
|
+
controls,
|
|
2223
|
+
measures: measureReads
|
|
2224
|
+
};
|
|
2225
|
+
}
|
|
2156
2226
|
// src/power.ts
|
|
2157
2227
|
/**
|
|
2158
2228
|
* The power test of a time verdict. It draws seeded benches with a known speedup and counts the verdicts that find it.
|
|
@@ -2267,6 +2337,6 @@ function timeRounds(arms, options) {
|
|
|
2267
2337
|
sink
|
|
2268
2338
|
};
|
|
2269
2339
|
}
|
|
2270
|
-
export { BUDGET_LOOKS, CEILING_ONLY, GATE_LOOKS, LADDER_FORMAT, UNKNOWN_MODEL, aaBand, aaSpread, armModels, armOrder, armVerdicts, balanceOrders, budgetLookSpend, budgetLooksVerdict, budgetVerdict, caseIntervals, caseRatios, caseTails, checkLadder, checkMeasures, checkPairedTime, controlFactor, firstArm, gateOf, ladderVerdict, limitOnModel, limitVerdict, modelRowText, modelTest, notSlowerVerdict, poolRecords, pooledBand, pooledLimitVerdict, pooledVerdict, rungVerdict, tailFalseFails, tailLimitVerdict, timeRounds, timeVerdict, verdictMargin, verdictPower, visibleShift, winClaim };
|
|
2340
|
+
export { BUDGET_LOOKS, CEILING_ONLY, GATE_LOOKS, LADDER_FORMAT, UNKNOWN_MODEL, aaBand, aaSpread, armModels, armOrder, armVerdicts, balanceOrders, budgetLookSpend, budgetLooksVerdict, budgetVerdict, caseIntervals, caseRatios, caseTails, checkLadder, checkMeasures, checkPairedTime, controlFactor, firstArm, gateOf, jointClaim, ladderVerdict, limitOnModel, limitVerdict, modelRowText, modelTest, notSlowerVerdict, orderSize, poolRecords, pooledBand, pooledLimitVerdict, pooledVerdict, rungVerdict, tailFalseFails, tailLimitVerdict, timeRounds, timeVerdict, verdictMargin, verdictPower, visibleShift, winClaim };
|
|
2271
2341
|
|
|
2272
2342
|
//# sourceMappingURL=index.js.map
|