import { Hashable } from './entry'; declare abstract class HashTableOpenAddressingBase { private DEFAULT_CAPACITY; protected TOMBSTONE: K; protected keyList: Array; protected valueList: Array; protected capacity: number; protected maxLoadFactor: number; protected threshold: number; protected modificationCount: number; protected usedBuckets: number; protected keyCount: number; constructor(capacity: number, maxLoadFactor: number); /***************************************************************************** ABSTRACT *****************************************************************************/ abstract setupProbing(key: K): void; abstract adjustCapacity(): void; abstract probe(x: number): number; /***************************************************************************** INSPECTION *****************************************************************************/ /** * Returns the size of the hash table - O(1) * @return {number} */ size(): number; /** * Returns true if the hash table is empty, and false otherwise - O(1) * @return {number} */ isEmpty(): boolean; /** * Returns capacity of the table - O(1) * @return {number} */ getCapacity(): number; /** * Clears the hash table - O(1) * @return {void} */ clear(): void; /** * Returns true if the hash table contains the key, and false otherwise * @param {K} key * @return {boolean} */ containsKey(key: K): boolean; /** * Returns a list of the hash table's keys - O(n) * @return {Array} */ keys(): Array; /** * Returns a list of the hash table's values - O(n) * @return {Array} */ values(): Array; /***************************************************************************** MAIN ****************************************************************************/ /** * Returns value associated with key, and null if the key does not exist - O(1) amortized * @param {K} key * @return {V | null} */ get(key: K): V | null; /** * Adds the [K, V] pair to the hash table - O(1) amortized * @param {K} key * @param {V} value * @returns {V | null} */ set(key: K, value: V | null): V | null; /** * Deletes the entry with key K - O(1) amortized * @param {K} key * @returns {V | null} */ delete(key: K): V | null; /***************************************************************************** HELPERS *****************************************************************************/ protected normalizeIndex(hash: number): number; protected increaseCapacity(): void; protected gcd(a: number, b: number): number; private resizeTable; } export default HashTableOpenAddressingBase; //# sourceMappingURL=hash-table-open-addressing-base.d.ts.map