import type { CellComplex, CellGroup } from './cell-complex.js'; export interface CuboidSimplexizationOptionsN { /** Optional explicit key for the generated simplex group. */ readonly outputKey?: string; /** Maximum generated simplex cells. Default 1,000,000. */ readonly maxOutputCells?: number; } /** One auditable Kuhn decomposition of a homogeneous cuboid cell group. */ export interface CuboidSimplexizationN { readonly dimension: number; readonly sourceCellCount: number; readonly simplicesPerCell: number; readonly permutations: readonly (readonly number[])[]; readonly simplexGroup: CellGroup; /** Parent source-cell ordinal for every generated simplex. */ readonly sourceCellIndices: Uint32Array; /** Local lexicographic axis-permutation ordinal for every simplex. */ readonly permutationIndices: Uint32Array; } /** * Decomposes every k-cuboid into k! simplices along its local main diagonal. * * Local cuboid vertices must use binary order: bit j selects local axis j. * Lexicographic axis permutations reproduce the established six-tetrahedron * cube decomposition exactly and generalize it to arbitrary practical k. */ export declare function simplexizeCuboidGroupN(group: CellGroup, options?: CuboidSimplexizationOptionsN): CuboidSimplexizationN; /** * Compatibility wrapper for tetrahedral slicing consumers. * * Converts every binary-ordered cuboid 3-cell group into tetrahedra and * appends the generated simplex groups to the same complex. Existing cuboid * groups remain in place. * * **Mutates `complex` and returns that same object**, rather than producing a * new one — the return value is a convenience, not a copy. A caller comparing * the argument against the result is comparing an object with itself. * * **Keeps only `simplexGroup`.** {@link simplexizeCuboidGroupN} also returns * `sourceCellIndices`, the parent source-cell ordinal of every generated * simplex, and `permutationIndices`. Both are dropped here. Call it directly * where provenance matters: a section vertex interpolated along a Kuhn diagonal * has no 1-cell to reference, and the parent-cell ordinal is what lets it * resolve to the 3-cell it came from instead. * * @example * ```ts * // Slicing only: the wrapper is enough. * const complex = tetrahedralizeCuboidCells(createHypercube({ dim: 4, size: 2 })); * * // Provenance: go to the producer, which keeps the parent-cell map. * const [cuboids] = complex.cellsOfDim(3); * if (!cuboids) throw new Error('no 3-cells to trace'); * * const simplexization = simplexizeCuboidGroupN(cuboids); * const parentCell = simplexization.sourceCellIndices[0]; * ``` */ export declare function tetrahedralizeCuboidCells(complex: CellComplex): CellComplex; //# sourceMappingURL=tetrahedralize.d.ts.map