List of usage examples for org.apache.solr.common.util Hash lookup3ycs
public static int lookup3ycs(CharSequence s, int start, int end, int initval)
The hash value of a character sequence is defined to be the hash of its unicode code points, according to #lookup3ycs(int[] k,int offset,int length,int initval)
If you know the number of code points in the CharSequence , you can generate the same hash as the original lookup3 via lookup3ycs(s, start, end, initval+(numCodePoints<<2))
From source file:org.knime.ext.textprocessing.nodes.transformation.documentvectorhashing.Lookup3_32bitHashingFunction.java
License:Open Source License
/** * {@inheritDoc}//from ww w. ja v a2s . c o m */ @Override public int hash(final String term, final int seed) { return Hash.lookup3ycs(term.subSequence(0, term.length()), 0, term.length(), seed); }