Class ArrayOfDoublesSetOperationBuilder
- java.lang.Object
-
- org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesSetOperationBuilder
-
public class ArrayOfDoublesSetOperationBuilder extends Object
Builds set operations object for tuple sketches of type ArrayOfDoubles.
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_NOMINAL_ENTRIESDefault Nominal Entries (a.k.a.static intDEFAULT_NUMBER_OF_VALUESDefault number of values
-
Constructor Summary
Constructors Constructor Description ArrayOfDoublesSetOperationBuilder()Creates an instance of the builder with default parameters
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ArrayOfDoublesAnotBbuildAnotB()Creates an instance of ArrayOfDoublesAnotB based on the current configuration of the builder.ArrayOfDoublesIntersectionbuildIntersection()Creates an instance of ArrayOfDoublesIntersection based on the current configuration of the builder.ArrayOfDoublesIntersectionbuildIntersection(org.apache.datasketches.memory.WritableMemory dstMem)Creates an instance of ArrayOfDoublesIntersection based on the current configuration of the builder.ArrayOfDoublesUnionbuildUnion()Creates an instance of ArrayOfDoublesUnion based on the current configuration of the builder.ArrayOfDoublesUnionbuildUnion(org.apache.datasketches.memory.WritableMemory dstMem)Creates an instance of ArrayOfDoublesUnion based on the current configuration of the builder and the given destination memory.ArrayOfDoublesSetOperationBuildersetNominalEntries(int nomEntries)This is to set the nominal number of entries.ArrayOfDoublesSetOperationBuildersetNumberOfValues(int numValues)This is to set the number of double values associated with each keyArrayOfDoublesSetOperationBuildersetSeed(long seed)Sets the long seed value that is required by the hashing function.
-
-
-
Field Detail
-
DEFAULT_NOMINAL_ENTRIES
public static final int DEFAULT_NOMINAL_ENTRIES
Default Nominal Entries (a.k.a. K)- See Also:
- Constant Field Values
-
DEFAULT_NUMBER_OF_VALUES
public static final int DEFAULT_NUMBER_OF_VALUES
Default number of values- See Also:
- Constant Field Values
-
-
Method Detail
-
setNominalEntries
public ArrayOfDoublesSetOperationBuilder setNominalEntries(int nomEntries)
This is to set the nominal number of entries.- Parameters:
nomEntries- Nominal number of entries. Forced to the nearest power of 2 greater than given value.- Returns:
- this builder
-
setNumberOfValues
public ArrayOfDoublesSetOperationBuilder setNumberOfValues(int numValues)
This is to set the number of double values associated with each key- Parameters:
numValues- number of double values- Returns:
- this builder
-
setSeed
public ArrayOfDoublesSetOperationBuilder setSeed(long seed)
Sets the long seed value that is required by the hashing function.- Parameters:
seed- See seed- Returns:
- this builder
-
buildUnion
public ArrayOfDoublesUnion buildUnion()
Creates an instance of ArrayOfDoublesUnion based on the current configuration of the builder. The new instance is allocated on the heap if the memory is not provided.- Returns:
- an instance of ArrayOfDoublesUnion
-
buildUnion
public ArrayOfDoublesUnion buildUnion(org.apache.datasketches.memory.WritableMemory dstMem)
Creates an instance of ArrayOfDoublesUnion based on the current configuration of the builder and the given destination memory.- Parameters:
dstMem- destination memory to be used by the sketch- Returns:
- an instance of ArrayOfDoublesUnion
-
buildIntersection
public ArrayOfDoublesIntersection buildIntersection()
Creates an instance of ArrayOfDoublesIntersection based on the current configuration of the builder. The new instance is allocated on the heap if the memory is not provided. The number of nominal entries is not relevant to this, so it is ignored.- Returns:
- an instance of ArrayOfDoublesIntersection
-
buildIntersection
public ArrayOfDoublesIntersection buildIntersection(org.apache.datasketches.memory.WritableMemory dstMem)
Creates an instance of ArrayOfDoublesIntersection based on the current configuration of the builder. The new instance is allocated on the heap if the memory is not provided. The number of nominal entries is not relevant to this, so it is ignored.- Parameters:
dstMem- destination memory to be used by the sketch- Returns:
- an instance of ArrayOfDoublesIntersection
-
buildAnotB
public ArrayOfDoublesAnotB buildAnotB()
Creates an instance of ArrayOfDoublesAnotB based on the current configuration of the builder. The memory is not relevant to this, so it is ignored if set. The number of nominal entries is not relevant to this, so it is ignored.- Returns:
- an instance of ArrayOfDoublesAnotB
-
-