/*! * Copyright (c) Microsoft Corporation and contributors. All rights reserved. * Licensed under the MIT License. */ export declare const enum Handle { /** * Sentinel representing the absence of a valid handle. */ none = 0, /** * Minimum valid handle. */ valid = 1, /** * Sentinel representing an unallocated Handle. Used by PermutationVector * to delay allocate handles when previously empty row/cols become populated. */ unallocated = -2147483648 } export declare const isHandleValid: (handle: Handle) => boolean; /** * A handle table provides a fast mapping from an integer `handle` to a value `T`. */ export declare class HandleTable { private readonly handles; constructor(handles?: (Handle | T)[]); clear(): void; /** * Allocates and returns the next available handle. Note that freed handles are recycled. */ allocate(): Handle; /** * Allocates and returns the next available `count` handles. */ allocateMany(count: Handle): Uint32Array; /** * Returns the given handle to the free list. */ free(handle: Handle): void; /** * Get the value `T` associated with the given handle, if any. */ get(handle: Handle): T; /** * Set the value `T` associated with the given handle. */ set(handle: Handle, value: T): void; private get next(); private set next(value); getSummaryContent(): (Handle | T)[]; static load(data: (Handle | T)[]): HandleTable; } //# sourceMappingURL=handletable.d.ts.map