Method GetMutable
GetMutable(Int32, Int32, Single)
Create a packed integer array with the given amount of values initialized
to 0. The valueCount
and the bitsPerValue
cannot be changed after creation.
All Mutables known by this factory are kept fully in RAM.
Positive values of acceptableOverheadRatio
will trade space
for speed by selecting a faster but potentially less memory-efficient
implementation. An acceptableOverheadRatio
of
COMPACT will make sure that the most memory-efficient
implementation is selected whereas FASTEST will make sure
that the fastest implementation is selected.
@lucene.internal
Declaration
public static PackedInt32s.Mutable GetMutable(int valueCount, int bitsPerValue, float acceptableOverheadRatio)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | valueCount | The number of elements. |
System.Int32 | bitsPerValue | The number of bits available for any given value. |
System.Single | acceptableOverheadRatio | An acceptable overhead ratio per value. |
Returns
Type | Description |
---|---|
PackedInt32s.Mutable | A mutable packed integer array. |
GetMutable(Int32, Int32, PackedInt32s.Format)
Same as GetMutable(Int32, Int32, Single) with a pre-computed number of bits per value and format.
@lucene.internal
Declaration
public static PackedInt32s.Mutable GetMutable(int valueCount, int bitsPerValue, PackedInt32s.Format format)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | valueCount | |
System.Int32 | bitsPerValue | |
PackedInt32s.Format | format |
Returns
Type | Description |
---|---|
PackedInt32s.Mutable |