class LSH that is full lsh implementation for high dimension vectors
class LSH { constructor(dimension: number) { this.dimension = dimension; this.fams = {}; this.hash = new Hash(dimension); } createFamily(k: number, l: number) { const familyName = `${k}-${l}`; if (this.fams[familyName] !== undefined) { return this.fams[familyName]; } this.fams[familyName] = { numOfHashes: k, numOfBands: l, buckets: {} }; return this.fams[familyName]; } insert(v: Vector, family: string, id: string) { const familyObj = this.fams[family]; const hash = this.hash.hash(v, familyObj.numOfHashes, familyObj.numOfBands); hash.forEach(h => { if (familyObj.buckets[h] === undefined) { familyObj.buckets