/*! * Copyright (c) Microsoft Corporation and contributors. All rights reserved. * Licensed under the MIT License. */ import type { IMatrixReader, IMatrixWriter, IMatrixProducer } from "@tiny-calc/nano"; type RecurArrayHelper = RecurArray | T; export type RecurArray = RecurArrayHelper[]; type UA = (T | undefined)[]; /** * A sparse 4 billion x 4 billion array stored as 16x16 tiles. */ export declare class SparseArray2D implements IMatrixReader, IMatrixWriter { private readonly root; constructor(root?: UA>>>>); readonly rowCount = 4294967295; readonly colCount = 4294967295; getCell(row: number, col: number): T | undefined; get matrixProducer(): IMatrixProducer; setCell(row: number, col: number, value: T | undefined): void; /** * Invokes the given 'callback' for each key in a 16 x 16 tile at the indicated row. * * (Note that 'rowBits' is the appropriate byte from 'r0ToMorton16' for the current * level being traversed.) */ private forEachKeyInRow; /** * Invokes the given 'callback' for each key in a 16 x 16 tile at the indicated col. * * (Note that 'colBits' is the appropriate byte from 'c0ToMorton16' for the current * level being traversed.) */ private forEachKeyInCol; /** * Invokes the give 'callback' with the next 'level' array for each populated region * of the given row in the 'currentLevel'. * * (Note that 'rowBits' is the appropriate byte from 'r0ToMorton16' for the current * level being traversed.) */ private forEachInRow; /** * Invokes the give 'callback' with the next 'level' array for each populated region * of the given col in the 'currentLevel'. * * (Note that 'colBits' is the appropriate byte from 'c0ToMorton16' for the current * level being traversed.) */ private forEachInCol; /** * Clears the all cells contained within the specified span of rows. */ clearRows(rowStart: number, rowCount: number): void; /** * Clears the all cells contained within the specifed span of cols. */ clearCols(colStart: number, colCount: number): void; private getLevel; snapshot(): UA>>>>; static load(data: RecurArray): SparseArray2D; } export {}; //# sourceMappingURL=sparsearray2d.d.ts.map