Changeset 31206 for other-projects/hathitrust
- Timestamp:
- 2016-12-12T15:05:33+13:00 (7 years ago)
- Location:
- other-projects/hathitrust/wcsa/extracted-features-solr/trunk/solr-ingest/src/main/java/com/google/common/hash
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/hathitrust/wcsa/extracted-features-solr/trunk/solr-ingest/src/main/java/com/google/common/hash/BloomFilterAdvanced.java
r31205 r31206 68 68 * <p>Implementations should be collections of pure functions (i.e. stateless). 69 69 */ 70 interface xxStrategy extends java.io.Serializable {70 interface Strategy extends java.io.Serializable { 71 71 72 72 /** … … 106 106 * The strategy we employ to map an element T to {@code numHashFunctions} bit indexes. 107 107 */ 108 private final BloomFilter.Strategy strategy;108 private final Strategy strategy; 109 109 110 110 /** … … 112 112 */ 113 113 private BloomFilterAdvanced( 114 BitArray bits, int numHashFunctions, Funnel<? super T> funnel, BloomFilter.Strategy strategy) {114 BitArray bits, int numHashFunctions, Funnel<? super T> funnel, Strategy strategy) { 115 115 checkArgument(numHashFunctions > 0, "numHashFunctions (%s) must be > 0", numHashFunctions); 116 116 checkArgument( … … 323 323 @VisibleForTesting 324 324 static <T> BloomFilterAdvanced<T> create( 325 Funnel<? super T> funnel, long expectedInsertions, double fpp, BloomFilter.Strategy strategy) {325 Funnel<? super T> funnel, long expectedInsertions, double fpp, Strategy strategy) { 326 326 checkNotNull(funnel); 327 327 checkArgument( … … 447 447 final int numHashFunctions; 448 448 final Funnel<? super T> funnel; 449 final BloomFilter.Strategy strategy;449 final Strategy strategy; 450 450 451 451 SerialForm(BloomFilterAdvanced<T> bf) { … … 511 511 dataLength = din.readInt(); 512 512 513 BloomFilter.Strategy strategy = BloomFilterAdvancedStrategies.values()[strategyOrdinal];513 Strategy strategy = BloomFilterAdvancedStrategies.values()[strategyOrdinal]; 514 514 long[] data = new long[dataLength]; 515 515 for (int i = 0; i < data.length; i++) { -
other-projects/hathitrust/wcsa/extracted-features-solr/trunk/solr-ingest/src/main/java/com/google/common/hash/BloomFilterAdvancedStrategies.java
r31205 r31206 36 36 * @author Kurt Alfred Kluever 37 37 */ 38 enum BloomFilterAdvancedStrategies implements BloomFilter .Strategy {38 enum BloomFilterAdvancedStrategies implements BloomFilterAdvanced.Strategy { 39 39 /** 40 40 * See "Less Hashing, Same Performance: Building a Better Bloom Filter" by Adam Kirsch and Michael
Note:
See TracChangeset
for help on using the changeset viewer.