public class SetOperationBuilder extends Object
Constructor and Description |
---|
SetOperationBuilder()
Constructor for building a new SetOperation.
|
Modifier and Type | Method and Description |
---|---|
SetOperation |
build(Family family)
Returns a SetOperation with the current configuration of this Builder and the given Family.
|
SetOperation |
build(Family family,
org.apache.datasketches.memory.WritableMemory dstMem)
Returns a SetOperation with the current configuration of this Builder, the given Family
and the given destination memory.
|
AnotB |
buildANotB()
Convenience method, returns a configured SetOperation ANotB with
Default Update Seed
|
Intersection |
buildIntersection()
Convenience method, returns a configured SetOperation Intersection with
Default Nominal Entries
|
Intersection |
buildIntersection(org.apache.datasketches.memory.WritableMemory dstMem)
Convenience method, returns a configured SetOperation Intersection with
Default Nominal Entries
and the given destination memory.
|
Union |
buildUnion()
Convenience method, returns a configured SetOperation Union with
Default Nominal Entries
|
Union |
buildUnion(org.apache.datasketches.memory.WritableMemory dstMem)
Convenience method, returns a configured SetOperation Union with
Default Nominal Entries
and the given destination memory.
|
int |
getLgNominalEntries()
Returns Log-base 2 Nominal Entries
|
org.apache.datasketches.memory.MemoryRequestServer |
getMemoryRequestServer()
Returns the MemoryRequestServer
|
float |
getP()
Returns the pre-sampling probability p
|
ResizeFactor |
getResizeFactor()
Returns the Resize Factor
|
long |
getSeed()
Returns the seed
|
SetOperationBuilder |
setLogNominalEntries(int lgNomEntries)
Alternative method of setting the Nominal Entries for this set operation from the log_base2 value.
|
SetOperationBuilder |
setMemoryRequestServer(org.apache.datasketches.memory.MemoryRequestServer memReqSvr)
Set the MemoryRequestServer
|
SetOperationBuilder |
setNominalEntries(int nomEntries)
Sets the Maximum Nominal Entries (max K) for this set operation.
|
SetOperationBuilder |
setP(float p)
Sets the upfront uniform sampling probability, p.
|
SetOperationBuilder |
setResizeFactor(ResizeFactor rf)
Sets the cache Resize Factor
|
SetOperationBuilder |
setSeed(long seed)
Sets the long seed value that is require by the hashing function.
|
String |
toString() |
public SetOperationBuilder()
ResizeFactor.X8
public SetOperationBuilder setNominalEntries(int nomEntries)
nomEntries
- Nominal Entries
This will become the ceiling power of 2 if it is not a power of 2.public SetOperationBuilder setLogNominalEntries(int lgNomEntries)
lgNomEntries
- the log_base2 Nominal Entries.public int getLgNominalEntries()
public SetOperationBuilder setSeed(long seed)
seed
- See seedpublic long getSeed()
public SetOperationBuilder setP(float p)
p
- See Sampling Probability, ppublic float getP()
public SetOperationBuilder setResizeFactor(ResizeFactor rf)
rf
- See Resize Factorpublic ResizeFactor getResizeFactor()
public SetOperationBuilder setMemoryRequestServer(org.apache.datasketches.memory.MemoryRequestServer memReqSvr)
memReqSvr
- the given MemoryRequestServerpublic org.apache.datasketches.memory.MemoryRequestServer getMemoryRequestServer()
public SetOperation build(Family family)
family
- the chosen SetOperation familypublic SetOperation build(Family family, org.apache.datasketches.memory.WritableMemory dstMem)
family
- the chosen SetOperation familydstMem
- The destination Memory.public Union buildUnion()
public Union buildUnion(org.apache.datasketches.memory.WritableMemory dstMem)
dstMem
- The destination Memory.public Intersection buildIntersection()
public Intersection buildIntersection(org.apache.datasketches.memory.WritableMemory dstMem)
dstMem
- The destination Memory.public AnotB buildANotB()
Copyright © 2015–2024 The Apache Software Foundation. All rights reserved.