public abstract static class RoaringBitmapWriter.Wizard<C extends WordStorage<C>,T extends BitmapDataProvider & AppendableStorage<C>> extends java.lang.Object implements java.util.function.Supplier<RoaringBitmapWriter<T>>
| 限定符和类型 | 字段和说明 |
|---|---|
protected boolean |
constantMemory |
protected java.util.function.Supplier<C> |
containerSupplier |
protected int |
expectedContainerSize |
protected int |
initialCapacity |
protected boolean |
partiallySortValues |
protected boolean |
runCompress |
| 限定符和类型 | 方法和说明 |
|---|---|
protected abstract java.util.function.Supplier<C> |
arraySupplier() |
RoaringBitmapWriter.Wizard<C,T> |
constantMemory()
All writes are buffered into the same buffer of 8kB, before converting to
the best container representation and appending to the bitmap.
|
protected abstract T |
createUnderlying(int initialCapacity) |
RoaringBitmapWriter.Wizard<C,T> |
doPartialRadixSort()
Will partially sort values, which can allocate O(n) temporary
memory but can significantly speed up adding unsorted values
to a bitmap.
|
RoaringBitmapWriter.Wizard<C,T> |
expectedDensity(double density)
Influence default container choice by how dense the bitmap is expected to be.
|
RoaringBitmapWriter.Wizard<C,T> |
expectedRange(long min,
long max)
Guesses the number of prefices required based on an estimate of the range the bitmap
will contain, assumes that all prefices in the range will be required.
|
RoaringBitmapWriter.Wizard<C,T> |
expectedValuesPerContainer(int count) |
RoaringBitmapWriter.Wizard<Container,FastRankRoaringBitmap> |
fastRank() |
RoaringBitmapWriter<T> |
get()
Builds a bitmap writer based on the supplied options.
|
RoaringBitmapWriter.Wizard<C,T> |
initialCapacity(int count)
Takes control of the size of the prefix array, in case it can be precalculated
or estimated.
|
RoaringBitmapWriter.Wizard<C,T> |
optimiseForArrays()
Choose this option if it is known that most containers will be sparse.
|
RoaringBitmapWriter.Wizard<C,T> |
optimiseForRuns()
Choose this option if the bitmap is expected to be RLE compressible.
|
RoaringBitmapWriter.Wizard<C,T> |
runCompress(boolean runCompress)
By default the bitmap will be run-compressed on the fly,
but it can be disabled (and run compressed at the end).
|
protected abstract java.util.function.Supplier<C> |
runSupplier() |
protected int initialCapacity
protected boolean constantMemory
protected boolean partiallySortValues
protected boolean runCompress
protected java.util.function.Supplier<C extends WordStorage<C>> containerSupplier
protected int expectedContainerSize
public RoaringBitmapWriter.Wizard<C,T> optimiseForArrays()
public RoaringBitmapWriter.Wizard<C,T> optimiseForRuns()
public RoaringBitmapWriter.Wizard<C,T> runCompress(boolean runCompress)
runCompress - whether to apply run compression on the fly.public RoaringBitmapWriter.Wizard<C,T> expectedValuesPerContainer(int count)
count - how many values are expected to fall within any 65536 bit range.public RoaringBitmapWriter.Wizard<Container,FastRankRoaringBitmap> fastRank()
public RoaringBitmapWriter.Wizard<C,T> constantMemory()
public RoaringBitmapWriter.Wizard<C,T> expectedDensity(double density)
density - value in [0.0, 1.0], density of the bitmappublic RoaringBitmapWriter.Wizard<C,T> expectedRange(long min, long max)
min - the inclusive min valuemax - the exclusive max valuepublic RoaringBitmapWriter.Wizard<C,T> initialCapacity(int count)
count - an estimate of the number of prefix keys required.public RoaringBitmapWriter.Wizard<C,T> doPartialRadixSort()
protected abstract java.util.function.Supplier<C> arraySupplier()
protected abstract java.util.function.Supplier<C> runSupplier()
protected abstract T createUnderlying(int initialCapacity)
public RoaringBitmapWriter<T> get()
get 在接口中 java.util.function.Supplier<RoaringBitmapWriter<T extends BitmapDataProvider & AppendableStorage<C>>>