public class UpdateSketchBuilder extends Object
| Constructor and Description |
|---|
UpdateSketchBuilder()
Constructor for building a new UpdateSketch.
|
| Modifier and Type | Method and Description |
|---|---|
UpdateSketch |
build()
Returns an UpdateSketch with the current configuration of this Builder.
|
UpdateSketch |
build(int nomEntries)
Returns an UpdateSketch with the current configuration of this Builder and the given
Nominal Entres.
|
Family |
getFamily()
Returns the Family
|
int |
getLgNominalEntries()
Returns Log-base 2 Nominal Entries
|
Memory |
getMemory()
Returns the Destination Memory
See Destination Memory.
|
float |
getP()
Returns the pre-sampling probability p
|
ResizeFactor |
getResizeFactor()
Returns the Resize Factor
|
long |
getSeed()
Returns the seed
|
UpdateSketchBuilder |
initMemory(Memory dstMem)
Initialize the specified backing destination Memory store.
|
UpdateSketchBuilder |
setFamily(Family family)
Set the Family.
|
UpdateSketchBuilder |
setNominalEntries(int nomEntries)
Sets the Nominal Entries for this sketch.
|
UpdateSketchBuilder |
setP(float p)
Sets the upfront uniform sampling probability, p
|
UpdateSketchBuilder |
setResizeFactor(ResizeFactor rf)
Sets the cache Resize Factor.
|
UpdateSketchBuilder |
setSeed(long seed)
Sets the long seed value that is required by the hashing function.
|
String |
toString() |
public UpdateSketchBuilder()
ResizeFactor.X8.
For direct sketches, which are targeted for native memory off the Java heap, this value will
be fixed at either ResizeFactor.X1 or
ResizeFactor.X2.Family.QUICKSELECTpublic UpdateSketchBuilder setNominalEntries(int nomEntries)
nomEntries - Nominal Entres
This will become the ceiling power of 2 if it is not.public int getLgNominalEntries()
public UpdateSketchBuilder setSeed(long seed)
seed - See seedpublic long getSeed()
public UpdateSketchBuilder setP(float p)
p - See Sampling Probability, ppublic float getP()
public UpdateSketchBuilder setResizeFactor(ResizeFactor rf)
rf - See Resize Factorpublic ResizeFactor getResizeFactor()
public UpdateSketchBuilder setFamily(Family family)
family - the family for this builderpublic Family getFamily()
public UpdateSketchBuilder initMemory(Memory dstMem)
dstMem - The destination Memory.
See Destination Memory.public Memory getMemory()
public UpdateSketch build()
public UpdateSketch build(int nomEntries)
nomEntries - Nominal Entres
This will become the ceiling power of 2 if it is not.Copyright © 2015–2017 Yahoo! Inc.. All rights reserved.