<notatio-collection-table>
As authored: Descents, or Max(_) - Min(_). */ readonly source: string; readonly label: string; /** The expression over _, or undefined when it did not parse. */ readonly json: MathJsonExpression | undefined; readonly error: string; }
interface Row { /** The 1-based index in the SOURCE collection — At(expr, index) is this row. */ readonly index: number; readonly text: string; readonly glyph: string; readonly cells: readonly CellValue[]; }
const PAGE_SIZES = [10, 20, 50, 100]; const SORT_LIMITS = [500, 2000, 10000]; const SCAN_STEP = 20000; /** How long one scan slice may hold the main thread before yielding. */ const SLICE_MS = 12;
const GLYPH_KINDS = new Set<GlyphKind>([ "permutation", "partition", "tableau", "composition", "subset", "dyck", "tree", "binary-tree", "set-partition", "lattice", "diagram", ]);
/** <notatio-collection-table expr="Subsets(4)"> -- a paged table over a lazy indexed collection. Rows are produced by unranking (At(expr, i)), one page at a time, so a collection is never materialised: SymmetricGroup(20) pages as cheaply as Subsets(4), and the # column is the index that reproduces each row.
columns names statistics to apply to every row — a head (Descents) or any expression over the row _ (Max(_) - Min(_)), comma-separated, addable and removable live. filter is a predicate over _; it is answered like Filter, by scanning the source in the background, bounded by scan-limit and extendable from the UI, and the match count is exact once the scan has covered the whole source. Sorting by a column has to materialise that column, so it is bounded by sort-limit and the table says when the order covers only a prefix of the rows.
Attributes
| Attribute | Type | Default | Notes |
|---|---|---|---|
expr | string | "" | The collection to enumerate, in notatio: Subsets(4), SymmetricGroup(5). |
columns | string | "" | Statistic columns, comma-separated. A bare head applies to the row (Descents means Descents(_)); anything else is an expression over _.reflects |
filter | string | "" | A predicate over the row _, e.g. FixedPoints(_) == 0. Empty for no filter.reflects |
sort | string | "" | The column (as written in columns) the rows are ordered by. Empty for index order.reflects |
descending | boolean | false | Sort descending rather than ascending.reflects |
page-size property pageSize | number | 20 | Rows per page. |
page | number | 1 | The current page, 1-based.reflects |
carrier | string | "" | The carrier its rows inhabit -- the constructor head from @enumeratio/domains, e.g. Permutation. Set it and each row is handed to the columns and the filter AS that carrier, so a statistic of a permutation (Cycles, FixedPoints) can be asked for at all: those heads take the carrier, not a bare list. Leave it unset and rows stay bare lists, which only the list-function statistics accept. |
glyph | string | "" | Draw each row as a glyph too: permutation, subset, partition, dyck, … |
n | number | 0 | Ground-set size for the subset glyph; taken from the collection's first argument when 0. |
scan-limit property scanLimit | number | SCAN_STEP | How many source rows a filter scan covers before it pauses and offers to go on. |
sort-limit property sortLimit | number | 2000 | How many rows a sort materialises; past this the order covers only a prefix. |
readonly | boolean | false | Hide the editors (expression, columns, filter) and show only the table and pager. |