public void SimpleCountableHashTest() { var o = BigInteger.One; var c = FeatureUtil.makeFullCVR(1, 1, 1, 1, 1, 1, 1); var bvbi = o | (o << 1) | (o << 2) | (o << 3) | (o << 4) | (o << (20 * 5)) | (o << (20 * 5 + 1)); var bv = UInt128.FromBigInteger(bvbi); var bv_is = LSHCalc.h7(c); Assert.AreEqual(bv, bv_is); }
public void HashesShouldNotCollideTest() { var r1 = Countable.NewFullCVectorResultant(7, 9, 7, 14, 0, 0, 0); var r2 = Countable.NewFullCVectorResultant(3, 9, 7, 14, 0, 0, 0); var lsh1 = LSHCalc.h7(r1); var lsh2 = LSHCalc.h7(r2); Assert.AreNotEqual(lsh1, lsh2); }