import { type AdvancedRegexGenAttrs } from './advanced-regex.js'; /** * The most different strings a pattern can make — what a unique column checks its row count * against first. Counted as `regexSpaceSize` counts a plain pattern, with the two constructs that * are this generator's own: a weighted choice adds its branches, and a conditional adds its * branches plus the empty string a row that matches none of them contributes (unless a `*` * branch leaves no such row). An upper bound, exact for what identifiers are made of. */ export declare function advancedRegexSpaceSize(attrs: AdvancedRegexGenAttrs): number; /** * A column dealt exactly as the plain generator deals it, and able to redraw any one row without * moving a single exact share. * * A weighted choice is a promise about the COLUMN — `(?%{70:RU;30:US})` puts RU on exactly seven * rows in ten — and uniqueness is a promise about every row. They meet here: each row remembers * the branches it was dealt, and a row whose value repeats is walked again ALONG THOSE BRANCHES, * drawing everything else afresh. The shares never move. What moves is the part of each value the * weighted choice did not decide. * * That makes the question "is there room?" a question per share, not per pattern. The pattern * above at 2 000 rows can make 2 000 strings, exactly as many as asked for — and the RU share alone * needs 1 400 of them from the 1 000 that start `RU-`. `pathSpace` answers per share when every * weighted choice stands where every row passes it (see `weightedOnSpine`), which is where * weighted choices are written in practice. Where one sits under a repeat, an alternation or a * conditional, a row's branches depend on its free draws too, the share cannot be counted on its * own, and the pattern's whole space stands in for it. */ export interface PlannedAdvancedColumn { /** The column as dealt, row by row — the same values the plain generator would deal. */ readonly values: string[]; /** `advancedRegexSpaceSize` of the pattern. */ readonly totalSpace: number; /** One key per row; rows with the same key were dealt the same branches. */ readonly pathKeys: readonly string[]; /** The strings a path can make, or `undefined` when the pattern's shares cannot be counted apart. */ pathSpace(key: string): number | undefined; /** The branches a path took, for a refusal: `70% (branch 1 of 2)`, joined by ` → `. */ describePath(key: string): string; /** * One more value for `row` along the branches it was dealt, or `undefined` when a free draw led * the walk past a different weighted choice than the row met the first time — which can only * happen when a weighted choice sits under something that is itself drawn. */ redraw(row: number, prng: () => number): string | undefined; } export declare function planAdvancedRegexColumn(attrs: AdvancedRegexGenAttrs, count: number, prng: () => number): PlannedAdvancedColumn; //# sourceMappingURL=advanced-regex-plan.d.ts.map