func NewMultiDecoder(dimension int, innerDec types.Decoder) *MultiDecoder { rounds := int(math.Ceil(float64(dimension) / float64(innerDec.GetDimensionality()))) return &MultiDecoder{ dimension: dimension, rounds: rounds, innerDec: innerDec, distance: -1.0, } }
func NewLSH(hash types.Hash, decoder types.Decoder, projector types.Projector) *LSH { return &LSH{ hash: hash, decoder: decoder, projector: projector, distance: 0.0, noise: nil, radius: decoder.GetErrorRadius() / float64(decoder.GetDimensionality()), } }