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

eu.mais_h.mathsync.BucketSelector Maven / Gradle / Ivy

There is a newer version: 0.6.2
Show newest version
package eu.mais_h.mathsync;

/**
 * Selects buckets to store items in.
 *
 * 

This interface leaks internal details about summary structure. One can implement and use custom instances to * customize settings but be ready for major changes in following versions.

*/ public interface BucketSelector { /** * Selects buckets to store items in. * *

The output array must contain integers between 0 and Integer.MAX_VALUE. It is better * if all integers in that range have the same probability of appearance.

* *

The output must be consistent, for any byte arraycontent, for any positive integer s, * multiple invocations of selectBuckets(s, content) must return the same array.

* *

Different seed values should lead to different resulting arrays.

* *

The number of returned buckets may vary for different contents and the returned array may contain * duplicates.

* * @param seed a seed preventing items to fall in the same buckets at all compression levels. * @param content the content to store. * @return an array of buckets to store content in. */ int[] selectBuckets(int seed, byte[] content); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy