Initial Commit - Sonnet 4.5

This commit is contained in:
2025-11-22 18:18:23 -05:00
commit 74fd80f91c
21 changed files with 2621 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
/**
* Interface for hash functions.
* Follows Interface Segregation Principle (ISP) and Dependency Inversion Principle (DIP).
* Allows different hashing strategies to be implemented and injected.
*/
export interface IHashFunction<K> {
/**
* Computes a hash value for the given key.
* @param key - The key to hash
* @param capacity - The current capacity of the hash table
* @returns A hash value in the range [0, capacity)
*/
hash(key: K, capacity: number): number;
}