@Test
public void testHashFunction() {

    BucketRandomProjectionLSH lsh = new BucketRandomProjectionLSH(0, 5, 2, 2, 1);
    Vector vec1 = new DenseVector(new double[]{1, 2, 3, 4, 5});
    Assert.assertEquals(new DenseVector(new double[]{-348137008, 1394862530}), lsh.hashFunction(vec1));
    Vector vec2 = new SparseVector(5, new int[]{0, 4}, new double[]{1.0, 4.0});
    Assert.assertEquals(new DenseVector(new double[]{-802232505, 1759100286}), lsh.hashFunction(vec2));
}