All Downloads are FREE. Search and download functionalities are using the official Maven repository.

info.debatty.spark.knngraphs.builder.LSHSuperBitSparseDoubleVector Maven / Gradle / Ivy

package info.debatty.spark.knngraphs.builder;

import info.debatty.java.graphs.SimilarityInterface;
import info.debatty.java.utils.SparseDoubleVector;

/**
 *
 * @author tibo
 */
public class LSHSuperBitSparseDoubleVector extends LSHSuperBit {

    public LSHSuperBitSparseDoubleVector() {
        super();
        this.similarity = new SimilarityInterface() {

            public double similarity(SparseDoubleVector value1, SparseDoubleVector value2) {
                return value1.cosineSimilarity(value2);
            }
        };
    }
    
    @Override
    int[] hash(SparseDoubleVector node_value) {
        return lsh.hash(node_value);
    }
    
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy