Searched defs:lookup3ycs (Results 1 - 1 of 1) sorted by relevance
| /lucene-3.6.0/solr/solrj/src/java/org/apache/solr/common/util/ |
| H A D | Hash.java | 29 * <p>The only problem with using lookup3 hashword is that it includes a length in the initial value. This would suck some performance out since directly hashing a UTF8 or UTF16 string (Java) would require a pre-scan to get the actual number of unicode code points. The solution was to simply remove the length factor, which is equivalent to biasing initVal by -(numCodePoints*4). This slightly modified lookup3 I define as lookup3ycs. 31 * <p>So the definition of the cross-platform string hash lookup3ycs is as follows: 38 * lookup3ycs(k,offset,length,initval) == lookup3(k,offset,length,initval-(length*4)) 42 * lookup3ycs(k,offset,length,initval+(length*4)) == lookup3(k,offset,length,initval) 44 * <p>An obvious advantage of this relationship is that you can use lookup3 if you don't have an implementation of lookup3ycs. 113 * {@code lookup3ycs(k,offset,length,initval) == lookup3(k,offset,length,initval-(length<<2))} 115 * {@code lookup3ycs(k,offset,length,initval+(length<<2)) == lookup3(k,offset,length,initval)} 117 public static int lookup3ycs(int[] k, int offset, int length, int initval) { method in class:Hash 124 * it's unicode code points, according to {@link #lookup3ycs(int[] k, int offset, int length, int initval)} 128 * via {@code lookup3ycs( 130 public static int lookup3ycs(CharSequence s, int start, int end, int initval) { method in class:Hash [all...] |
Completed in 782 milliseconds