类 RoaringBitmapWriter.Wizard<C extends WordStorage<C>,T extends BitmapDataProvider & AppendableStorage<C>>
java.lang.Object
org.bitlap.roaringbitmap.RoaringBitmapWriter.Wizard<C,T>
- 所有已实现的接口:
Supplier<RoaringBitmapWriter<T>>
- 封闭接口:
- RoaringBitmapWriter<T extends BitmapDataProvider>
public abstract static class RoaringBitmapWriter.Wizard<C extends WordStorage<C>,T extends BitmapDataProvider & AppendableStorage<C>>
extends Object
implements Supplier<RoaringBitmapWriter<T>>
-
字段概要
字段修饰符和类型字段说明protected booleanprotected intprotected intprotected booleanprotected boolean -
方法概要
修饰符和类型方法说明All writes are buffered into the same buffer of 8kB, before converting to the best container representation and appending to the bitmap.protected abstract TcreateUnderlying(int initialCapacity) Will partially sort values, which can allocate O(n) temporary memory but can significantly speed up adding unsorted values to a bitmap.expectedDensity(double density) Influence default container choice by how dense the bitmap is expected to be.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.expectedValuesPerContainer(int count) fastRank()get()Builds a bitmap writer based on the supplied options.initialCapacity(int count) Takes control of the size of the prefix array, in case it can be precalculated or estimated.Choose this option if it is known that most containers will be sparse.Choose this option if the bitmap is expected to be RLE compressible.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).
-
字段详细资料
-
initialCapacity
protected int initialCapacity -
constantMemory
protected boolean constantMemory -
partiallySortValues
protected boolean partiallySortValues -
runCompress
protected boolean runCompress -
containerSupplier
-
expectedContainerSize
protected int expectedContainerSize
-
-
方法详细资料
-
optimiseForArrays
Choose this option if it is known that most containers will be sparse.- 返回:
- this
-
optimiseForRuns
Choose this option if the bitmap is expected to be RLE compressible. Will buffer additions into a RunContainer.- 返回:
- this
-
runCompress
By default the bitmap will be run-compressed on the fly, but it can be disabled (and run compressed at the end).- 参数:
runCompress- whether to apply run compression on the fly.- 返回:
- this
-
expectedValuesPerContainer
- 参数:
count- how many values are expected to fall within any 65536 bit range.- 返回:
- this
-
fastRank
-
constantMemory
All writes are buffered into the same buffer of 8kB, before converting to the best container representation and appending to the bitmap. This option overrides any optimiseForArrays, optimiseForRuns and optimiseForBitmaps settings.- 返回:
- this
-
expectedDensity
Influence default container choice by how dense the bitmap is expected to be.- 参数:
density- value in [0.0, 1.0], density of the bitmap- 返回:
- this
-
expectedRange
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. This is a good heuristic for a contiguous bitmap, and, for instance, a very bad heuristic for a bitmap with just two values far apart.- 参数:
min- the inclusive min valuemax- the exclusive max value- 返回:
- this
-
initialCapacity
Takes control of the size of the prefix array, in case it can be precalculated or estimated. This can potentially save many array allocations during building the bitmap.- 参数:
count- an estimate of the number of prefix keys required.- 返回:
- this
-
doPartialRadixSort
Will partially sort values, which can allocate O(n) temporary memory but can significantly speed up adding unsorted values to a bitmap.- 返回:
- this
-
arraySupplier
-
runSupplier
-
createUnderlying
-
get
Builds a bitmap writer based on the supplied options. A call to this method is repeatable, and will not fail because the wizard should already be in a valid state.- 指定者:
get在接口中Supplier<C extends WordStorage<C>>- 返回:
- a new RoaringBitmapWriter
-