Class BufferChunkDoubleNullable
- java.lang.Object
-
- com.qfs.chunk.impl.AChunk<Double>
-
- com.qfs.chunk.buffer.impl.BufferChunkDouble
-
- com.qfs.chunk.buffer.impl.BufferChunkDoubleNullable
-
- All Implemented Interfaces:
IArray,IArrayNullable,IArrayReader,IArrayWriter,IChunk<Double>,IChunkDouble,IChunkNullable<Double>,IWritableArray,IMemoryMonitored,Externalizable,Serializable
public class BufferChunkDoubleNullable extends BufferChunkDouble implements IArrayNullable, IChunkNullable<Double>
Chunk to store primitive double values that can be null.- Author:
- ActiveViam
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface com.qfs.chunk.IChunk
NO_SIZE_LIMIT
-
-
Constructor Summary
Constructors Constructor Description BufferChunkDoubleNullable()Empty constructor (for serialization purpose).BufferChunkDoubleNullable(int chunkSize, IBufferAllocator allocator)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDouble(int position, double addedValue)Adds a double primitive value to an element of the array.IChunk<Double>compress(IRowMapping mapping, int[] arrayMapping, int newChunkSize, IChunkFactory<Double> defaultChunkCreator)Creates a compressed chunk from this chunk, using only the rows given in the mapping.IChunk<Double>compressAsNotNullable(IRowMapping mapping, int[] arrayMapping, int newChunkSize, IChunkFactory<Double> defaultChunkCreator)Compresses the chunk knowing there are not anynullin the chunk.voidcopyInto(int position, IWritableCell cell)Copies the value at a given position in this chunk into the provided cell.Runnabledestroy()Equivalent to a finalizer for this chunk, but that can be called by the application when it is certain that the chunk will not be used or even reached anymore.RunnabledestroyNullFlags()Returns the runnable to run to destroy the nullable flags.voidfill(double value)Fills all slots in the chunk with the same value.voidfindRowsEqualTo(Object value, int chunkBase, int chunkLimit, IRowMapping mapping, int limit, IBitmap result)Scans all the records and returns all the rows matching with the sought object in the chunk.voidfindRowsEqualTo(Object value, long epoch, IChunkLong version, int chunkBase, int chunkLimit, IRowMapping mapping, int limit, IBitmap result)Scans all the records and returns all the rows matching with the sought object in the chunk.voidfindRowsEqualTo(Object value, IIntIterator filter, int chunkBase, IRowMapping mapping, int limit, IBitmap result)Scans all the records and returns all the rows matching with the sought object in the chunk.voidfindRowsInSet(Set<Object> values, int chunkBase, int chunkLimit, IRowMapping mapping, int limit, IBitmap result)Scans all the records and returns all the rows matching with any object in the set of sought objects in the chunk.voidfindRowsInSet(Set<Object> values, long epoch, IChunkLong version, int chunkBase, int chunkLimit, IRowMapping mapping, int limit, IBitmap result)Scans all the records and returns all the rows matching with any object in the set of sought objects in the chunk.voidfindRowsInSet(Set<Object> values, IIntIterator filter, int chunkBase, IRowMapping mapping, int limit, IBitmap result)Scans all the records and returns all the rows matching with any object in the set of sought objects in the chunk.voidfindRowsInTransactionEqualTo(Object value, IIntIterator filter, IBitmap deletions, int chunkBase, IRowMapping mapping, int limit, IBitmap result)Scans all the records and returns all the rows matching with the sought object in the chunk.voidfindRowsInTransactionEqualTo(Object value, IChunkLong version, int chunkBase, int chunkLimit, IRowMapping mapping, int limit, IBitmap result)Scans all the records and returns all the rows matching with the sought object in the chunk.voidfindRowsInTransactionEqualTo(Object value, IChunkLong version, IBitmap deletions, int chunkBase, int chunkLimit, IRowMapping mapping, int limit, IBitmap result)Scans all the records and returns all the rows matching with the sought object in the chunk.voidfindRowsInTransactionInSet(Set<Object> values, IIntIterator filter, IBitmap deletions, int chunkBase, IRowMapping mapping, int limit, IBitmap result)Scans all the records and returns all the rows matching with any object in the set of sought objects in the chunk.voidfindRowsInTransactionInSet(Set<Object> values, IChunkLong version, int chunkBase, int chunkLimit, IRowMapping mapping, int limit, IBitmap result)Scans all the records and returns all the rows matching with any object in the set of sought objects in the chunk.voidfindRowsInTransactionInSet(Set<Object> values, IChunkLong version, IBitmap deletions, int chunkBase, int chunkLimit, IRowMapping mapping, int limit, IBitmap result)Scans all the records and returns all the rows matching with any object in the set of sought objects in the chunk.booleanisNull(int position)Always returns false because this chunk cannot store null values.Doubleread(int position)Returns the data stored at that position in the chunk.RunnablereplaceBy(IChunk<?> replacement)Returns the destructor to run when this chunk is replaced by the given chunk.voidreset()Leaves the chunk untouched.voidtransfer(IWritableTable destination, int destinationColumn, int[] rowsMapping, int numRows)Transfers a given number of rows from this chunk to target rows in the given column of the destinationtable.voidwrite(int position, Object value)Writes a piece of data at a position in the array.voidwriteDouble(int position, double value)Writes a double primitive value in the array.voidwriteFloat(int position, float value)Writes a float primitive value in the array.voidwriteFromCell(int position, IReadableCell cell)Writes the content of the cell into the chunk at the given position.voidwriteInt(int position, int value)Writes an int primitive value in the array.voidwriteLong(int position, long value)Writes a long primitive value in the array.-
Methods inherited from class com.qfs.chunk.buffer.impl.BufferChunkDouble
capacity, equals, isDead, readDouble, readExternal, writeExternal
-
Methods inherited from class com.qfs.chunk.impl.AChunk
getChunkId, getMemoryStatistic
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.qfs.chunk.IArrayReader
readBoolean, readFloat, readInt, readLong, readVector
-
Methods inherited from interface com.qfs.chunk.IArrayWriter
addFloat, addInt, addLong, writeBoolean
-
Methods inherited from interface com.qfs.chunk.IChunk
capacity, createArrayCursor, freeRow, getChunkCreatorForSparse, getChunkId, getChunkType, getPhysicalSize, isDead, localRow, sparseChunkCompression
-
Methods inherited from interface com.qfs.chunk.IChunkDouble
createFrequentValueChunk, getBindingType, isPrimitive
-
Methods inherited from interface com.qfs.monitoring.memory.IMemoryMonitored
getMemoryStatistic
-
-
-
-
Constructor Detail
-
BufferChunkDoubleNullable
public BufferChunkDoubleNullable()
Empty constructor (for serialization purpose).
-
BufferChunkDoubleNullable
public BufferChunkDoubleNullable(int chunkSize, IBufferAllocator allocator)Constructor.- Parameters:
chunkSize- The size of the chunk to allocate (the number of doubles it can store).allocator- The allocator to use to create the underlyingByteBufferresponsible for storing the underlying data.
-
-
Method Detail
-
isNull
public boolean isNull(int position)
Description copied from class:BufferChunkDoubleAlways returns false because this chunk cannot store null values.- Specified by:
isNullin interfaceIArrayReader- Overrides:
isNullin classBufferChunkDouble- Parameters:
position- 0-based index in an array- Returns:
- false because this chunk cannot store null values
-
read
public Double read(int position)
Description copied from interface:IChunkReturns the data stored at that position in the chunk.- Specified by:
readin interfaceIArrayReader- Specified by:
readin interfaceIChunk<Double>- Specified by:
readin interfaceIChunkDouble- Overrides:
readin classBufferChunkDouble- Parameters:
position- the position in the chunk at which to read- Returns:
- the data stored at that position in the chunk
-
write
public void write(int position, Object value)Description copied from interface:IArrayWriterWrites a piece of data at a position in the array.For better performance, use the primitive type operations.
- Specified by:
writein interfaceIArrayWriter- Specified by:
writein interfaceIChunkDouble- Overrides:
writein classBufferChunkDouble- Parameters:
position- 0-based index in the arrayvalue- the value to write
-
writeInt
public void writeInt(int position, int value)Description copied from interface:IArrayWriterWrites an int primitive value in the array.- Specified by:
writeIntin interfaceIArrayWriter- Specified by:
writeIntin interfaceIChunkDouble- Overrides:
writeIntin classBufferChunkDouble- Parameters:
position- 0-based index in the arrayvalue- the value to write
-
writeLong
public void writeLong(int position, long value)Description copied from interface:IArrayWriterWrites a long primitive value in the array.- Specified by:
writeLongin interfaceIArrayWriter- Specified by:
writeLongin interfaceIChunkDouble- Overrides:
writeLongin classBufferChunkDouble- Parameters:
position- 0-based index in the arrayvalue- the value to write
-
writeFloat
public void writeFloat(int position, float value)Description copied from interface:IArrayWriterWrites a float primitive value in the array.- Specified by:
writeFloatin interfaceIArrayWriter- Specified by:
writeFloatin interfaceIChunkDouble- Overrides:
writeFloatin classBufferChunkDouble- Parameters:
position- 0-based index in the arrayvalue- the value to write
-
writeDouble
public void writeDouble(int position, double value)Description copied from interface:IArrayWriterWrites a double primitive value in the array.- Specified by:
writeDoublein interfaceIArrayWriter- Specified by:
writeDoublein interfaceIChunkDouble- Overrides:
writeDoublein classBufferChunkDouble- Parameters:
position- 0-based index in the arrayvalue- the value to write
-
addDouble
public void addDouble(int position, double addedValue)Description copied from interface:IArrayWriterAdds a double primitive value to an element of the array.- Specified by:
addDoublein interfaceIArrayWriter- Overrides:
addDoublein classBufferChunkDouble- Parameters:
position- 0-based index in the arrayaddedValue- the value to add
-
transfer
public void transfer(IWritableTable destination, int destinationColumn, int[] rowsMapping, int numRows)
Description copied from interface:IChunkTransfers a given number of rows from this chunk to target rows in the given column of the destinationtable.The mapping from the source rows to the target rows is described with an array of
2*nslots. Each even slot contains the index of the row to be copied from the source chunk and the following odd slot contains the index of the row into which the source data will be transferred.- Specified by:
transferin interfaceIChunk<Double>- Specified by:
transferin interfaceIChunkDouble- Overrides:
transferin classBufferChunkDouble- Parameters:
destination- the destination tabledestinationColumn- the column to transfer the data to in the destination tablerowsMapping- the mapping from source rows to target rows, as explained abovenumRows- the number of rows to transfer
-
copyInto
public void copyInto(int position, IWritableCell cell)Description copied from interface:IChunkCopies the value at a given position in this chunk into the provided cell.- Specified by:
copyIntoin interfaceIChunk<Double>- Specified by:
copyIntoin interfaceIChunkDouble- Parameters:
position- row of the chunk to read
-
writeFromCell
public void writeFromCell(int position, IReadableCell cell)Description copied from interface:IChunkWrites the content of the cell into the chunk at the given position.It is up to chunks to use the appropriate read method to avoid boxing as much as possible.
- Specified by:
writeFromCellin interfaceIChunk<Double>- Specified by:
writeFromCellin interfaceIChunkDouble
-
destroy
public Runnable destroy()
Description copied from interface:IChunkEquivalent to a finalizer for this chunk, but that can be called by the application when it is certain that the chunk will not be used or even reached anymore.Chunk implementations can use this opportunity to dereference objects, or even free memory in the case of direct memory chunks. For that reason it is unsafe to call destroy() and it is possible to crash the JVM if the chunk is accessed after its memory has been reclaimed.
Most often this
Runnableis registered toIActiveCollector.register(Runnable)to make sure that the destruction is safe.
-
reset
public void reset()
Description copied from class:BufferChunkDoubleLeaves the chunk untouched.- Specified by:
resetin interfaceIChunk<Double>- Overrides:
resetin classBufferChunkDouble
-
fill
public void fill(double value)
Description copied from interface:IChunkDoubleFills all slots in the chunk with the same value.- Specified by:
fillin interfaceIChunkDouble- Overrides:
fillin classBufferChunkDouble- Parameters:
value- the value to fill the chunk with
-
findRowsEqualTo
public void findRowsEqualTo(Object value, long epoch, IChunkLong version, int chunkBase, int chunkLimit, IRowMapping mapping, int limit, IBitmap result)
Description copied from interface:IChunkScans all the records and returns all the rows matching with the sought object in the chunk.- Specified by:
findRowsEqualToin interfaceIChunk<Double>- Overrides:
findRowsEqualToin classBufferChunkDouble- Parameters:
value- the sought objectepoch- the epoch will define which rows are read. Only rows created before or deleted after this epoch will be readversion- the column holding the version number at which each row has been inserted or removedchunkBase- the offset in the result, the offset is the row number in the store corresponding to the first row in this chunkchunkLimit- the number of rows to iterate in this chunk, it should not be bigger than the chunk sizemapping- this mapping is only used when this chunk is aSparseChunk, and it is a map of the global row chunk to the underlying chunk, otherwise isnulllimit- the size limit for the result of this search, it can be0for a non limit size resultresult- abitmapto add the row numbers matching with the sought object
-
findRowsEqualTo
public void findRowsEqualTo(Object value, int chunkBase, int chunkLimit, IRowMapping mapping, int limit, IBitmap result)
Description copied from interface:IChunkScans all the records and returns all the rows matching with the sought object in the chunk.- Specified by:
findRowsEqualToin interfaceIChunk<Double>- Overrides:
findRowsEqualToin classBufferChunkDouble- Parameters:
value- the sought objectchunkBase- the offset in the result, the offset is the row number in the store corresponding to the first row in this chunkchunkLimit- the number of rows to iterate in this chunk, it should not be bigger than the chunk sizemapping- this mapping is only used when this chunk is aSparseChunk, and it is a map of the global row chunk to the underlying chunk, otherwise isnulllimit- the size limit for the result of this search, it can be0for a non limit size resultresult- abitmapto add the row numbers matching with the sought object
-
findRowsEqualTo
public void findRowsEqualTo(Object value, IIntIterator filter, int chunkBase, IRowMapping mapping, int limit, IBitmap result)
Description copied from interface:IChunkScans all the records and returns all the rows matching with the sought object in the chunk.- Specified by:
findRowsEqualToin interfaceIChunk<Double>- Overrides:
findRowsEqualToin classBufferChunkDouble- Parameters:
value- the sought objectfilter- all the row numbers that should be considered for this researchchunkBase- the offset in the result, the offset is the row number in the store corresponding to the first row in this chunkmapping- this mapping is only used when this chunk is aSparseChunk, and it is a map of the global row chunk to the underlying chunk, otherwise isnulllimit- the size limit for the result of this search, it can be0for a non limit size resultresult- abitmapto add the row numbers matching with the sought object
-
findRowsInSet
public void findRowsInSet(Set<Object> values, long epoch, IChunkLong version, int chunkBase, int chunkLimit, IRowMapping mapping, int limit, IBitmap result)
Description copied from interface:IChunkScans all the records and returns all the rows matching with any object in the set of sought objects in the chunk.- Specified by:
findRowsInSetin interfaceIChunk<Double>- Overrides:
findRowsInSetin classBufferChunkDouble- Parameters:
values- the set of sought objectsepoch- the epoch will define which rows are read, only rows created before or deleted after this epoch will be readversion- the column holding the version number at which each row has been inserted or removedchunkBase- the offset in the result, the offset is the row number in the store corresponding to the first row in this chunkchunkLimit- the number of rows to iterate in this chunk, it should not be bigger than the chunk sizemapping- this mapping is only used when this chunk is aSparseChunk, and it is a map of the global row chunk to the underlying chunk, otherwise isnulllimit- the size limit for the result of this search, it can be0for a non limit size resultresult- abitmapto add the row numbers matching with any object in the set of sought objects
-
findRowsInSet
public void findRowsInSet(Set<Object> values, int chunkBase, int chunkLimit, IRowMapping mapping, int limit, IBitmap result)
Description copied from interface:IChunkScans all the records and returns all the rows matching with any object in the set of sought objects in the chunk.- Specified by:
findRowsInSetin interfaceIChunk<Double>- Overrides:
findRowsInSetin classBufferChunkDouble- Parameters:
values- the set of sought objectschunkBase- the offset in the result, the offset is the row number in the store corresponding to the first row in this chunkchunkLimit- the number of rows to iterate in this chunk, it should not be bigger than the chunk sizemapping- this mapping is only used when this chunk is aSparseChunk, and it is a map of the global row chunk to the underlying chunk, otherwise isnulllimit- the size limit for the result of this search, it can be0for a non limit size resultresult- abitmapto add the row numbers matching with any object in the set of sought objects
-
findRowsInSet
public void findRowsInSet(Set<Object> values, IIntIterator filter, int chunkBase, IRowMapping mapping, int limit, IBitmap result)
Description copied from interface:IChunkScans all the records and returns all the rows matching with any object in the set of sought objects in the chunk.- Specified by:
findRowsInSetin interfaceIChunk<Double>- Overrides:
findRowsInSetin classBufferChunkDouble- Parameters:
values- the set of sought objectsfilter- all the row numbers that should be considered for this researchchunkBase- the offset in the result, the offset is the row number in the store corresponding to the first row in this chunkmapping- this mapping is only used when this chunk is aSparseChunk, and it is a map of the global row chunk to the underlying chunk, otherwise isnulllimit- the size limit for the result of this search, it can be0for a non limit size resultresult- abitmapto add the row numbers matching with any object in the set of sought objects
-
findRowsInTransactionEqualTo
public void findRowsInTransactionEqualTo(Object value, IChunkLong version, int chunkBase, int chunkLimit, IRowMapping mapping, int limit, IBitmap result)
Description copied from interface:IChunkScans all the records and returns all the rows matching with the sought object in the chunk.- Specified by:
findRowsInTransactionEqualToin interfaceIChunk<Double>- Overrides:
findRowsInTransactionEqualToin classBufferChunkDouble- Parameters:
value- the sought objectversion- the column holding the version number at which each row has been inserted or removed corresponding to this chunkchunkBase- the offset in the result, the offset is the row number in the store corresponding to the first row in this chunkchunkLimit- the number of rows to iterate in this chunk, it should not be bigger than the chunk sizemapping- this mapping is only used when this chunk is aSparseChunk, and it is a map of the global row chunk to the underlying chunk, otherwise isnulllimit- the size limit for the result of this search, it can be0for a non limit size resultresult- abitmapto add the row numbers matching with the sought object
-
findRowsInTransactionEqualTo
public void findRowsInTransactionEqualTo(Object value, IChunkLong version, IBitmap deletions, int chunkBase, int chunkLimit, IRowMapping mapping, int limit, IBitmap result)
Description copied from interface:IChunkScans all the records and returns all the rows matching with the sought object in the chunk.- Specified by:
findRowsInTransactionEqualToin interfaceIChunk<Double>- Overrides:
findRowsInTransactionEqualToin classBufferChunkDouble- Parameters:
value- the sought objectversion- the column holding the version number at which each row has been inserted or removed corresponding to this chunkdeletions- a bitmap of deleted rows, that should not be scannedchunkBase- the offset in the result, the offset is the row number in the store corresponding to the first row in this chunkchunkLimit- the number of rows to iterate in this chunk, it should not be bigger than the chunk sizemapping- this mapping is only used when this chunk is aSparseChunk, and it is a map of the global row chunk to the underlying chunk, otherwise isnulllimit- the size limit for the result of this search, it can be0for a non limit size resultresult- abitmapto add the row numbers matching with the sought object
-
findRowsInTransactionEqualTo
public void findRowsInTransactionEqualTo(Object value, IIntIterator filter, IBitmap deletions, int chunkBase, IRowMapping mapping, int limit, IBitmap result)
Description copied from interface:IChunkScans all the records and returns all the rows matching with the sought object in the chunk.- Specified by:
findRowsInTransactionEqualToin interfaceIChunk<Double>- Overrides:
findRowsInTransactionEqualToin classBufferChunkDouble- Parameters:
value- the sought objectfilter- all the row numbers that should be considered for this researchdeletions- a bitmap of deleted rows, that should not be scannedchunkBase- the offset in the result, the offset is the row number in the store corresponding to the first row in this chunkmapping- this mapping is only used when this chunk is aSparseChunk, and it is a map of the global row chunk to the underlying chunk, otherwise isnulllimit- the size limit for the result of this search, it can be0for a non limit size resultresult- abitmapto add the row numbers matching with the sought object
-
findRowsInTransactionInSet
public void findRowsInTransactionInSet(Set<Object> values, IChunkLong version, int chunkBase, int chunkLimit, IRowMapping mapping, int limit, IBitmap result)
Description copied from interface:IChunkScans all the records and returns all the rows matching with any object in the set of sought objects in the chunk.- Specified by:
findRowsInTransactionInSetin interfaceIChunk<Double>- Overrides:
findRowsInTransactionInSetin classBufferChunkDouble- Parameters:
values- the set of sought objectsversion- the column holding the version number at which each row has been inserted or removed corresponding to this chunkchunkBase- the offset in the result, the offset is the row number in the store corresponding to the first row in this chunkchunkLimit- the number of rows to iterate in this chunk, it should not be bigger than the chunk sizemapping- this mapping is only used when this chunk is aSparseChunk, and it is a map of the global row chunk to the underlying chunk, otherwise isnulllimit- the size limit for the result of this search, it can be0for a non limit size resultresult- abitmapto add the row numbers matching with any object in the set of sought objects
-
findRowsInTransactionInSet
public void findRowsInTransactionInSet(Set<Object> values, IChunkLong version, IBitmap deletions, int chunkBase, int chunkLimit, IRowMapping mapping, int limit, IBitmap result)
Description copied from interface:IChunkScans all the records and returns all the rows matching with any object in the set of sought objects in the chunk.- Specified by:
findRowsInTransactionInSetin interfaceIChunk<Double>- Overrides:
findRowsInTransactionInSetin classBufferChunkDouble- Parameters:
values- the set of sought objectsversion- the column holding the version number at which each row has been inserted or removed corresponding to this chunkdeletions- a bitmap of deleted rows, that should not be scannedchunkBase- the offset in the result, the offset is the row number in the store corresponding to the first row in this chunkchunkLimit- the number of rows to iterate in this chunk, it should not be bigger than the chunk sizemapping- this mapping is only used when this chunk is aSparseChunk, and it is a map of the global row chunk to the underlying chunk, otherwise isnulllimit- the size limit for the result of this search, it can be0for a non limit size resultresult- abitmapto add the row numbers matching with any object in the set of sought objects
-
findRowsInTransactionInSet
public void findRowsInTransactionInSet(Set<Object> values, IIntIterator filter, IBitmap deletions, int chunkBase, IRowMapping mapping, int limit, IBitmap result)
Description copied from interface:IChunkScans all the records and returns all the rows matching with any object in the set of sought objects in the chunk.- Specified by:
findRowsInTransactionInSetin interfaceIChunk<Double>- Overrides:
findRowsInTransactionInSetin classBufferChunkDouble- Parameters:
values- the set of sought objectsfilter- all the row numbers that should be considered for this researchdeletions- a bitmap of deleted rows, that should not be scannedchunkBase- the offset in the result, the offset is the row number in the store corresponding to the first row in this chunkmapping- this mapping is only used when this chunk is aSparseChunk, and it is a map of the global row chunk to the underlying chunk, otherwise isnulllimit- the size limit for the result of this search, it can be0for a non limit size resultresult- abitmapto add the row numbers matching with any object in the set of sought objects
-
replaceBy
public Runnable replaceBy(IChunk<?> replacement)
Description copied from interface:IChunkReturns the destructor to run when this chunk is replaced by the given chunk.
-
compress
public IChunk<Double> compress(IRowMapping mapping, int[] arrayMapping, int newChunkSize, IChunkFactory<Double> defaultChunkCreator)
Description copied from interface:IChunkCreates a compressed chunk from this chunk, using only the rows given in the mapping. The mapping is given in different representations :- The mapping as an
IRowMappingfrom the rows of the externally visible chunk to those of the compressed chunk. This representation corresponds to the mapping used inSparseChunk - The arrayMapping as an array of
2*nslots. This representation corresponds to the mapping used inIChunkBinding.transfer(int[], int). Each even slot contains the index of the row to be copied from this chunk and the following odd slot contains the index of the row into which the data will be in the compressed chunk.
Note that the two representations of the mapping can seem inconsistent, in case we are recompressing the underlying chunk of a sparse chunk (the
IRowMappingmaps the externally visible rows to the rows of the future underlying of the future re-compressed chunk, while the arrayMapping maps the rows of current underlying chunk to the future underlying of re-compressed chunk).- Specified by:
compressin interfaceIChunk<Double>- Overrides:
compressin classBufferChunkDouble- Parameters:
mapping- the mapping from the rows of the externally visible chunk to those of the compressed chunkarrayMapping- the array representation of the mappingnewChunkSize- the size of the chunk we want to createdefaultChunkCreator- the chunk creator for a "normal" chunk (if this chunks knows of a better way to sparse itself, it can use it)- Returns:
- a compressed chunk containing the copied data from this chunk
- The mapping as an
-
compressAsNotNullable
public IChunk<Double> compressAsNotNullable(IRowMapping mapping, int[] arrayMapping, int newChunkSize, IChunkFactory<Double> defaultChunkCreator)
Description copied from interface:IChunkNullableCompresses the chunk knowing there are not anynullin the chunk.- Specified by:
compressAsNotNullablein interfaceIChunkNullable<Double>- Parameters:
mapping- the mapping from the rows of this chunk to those of the compressed chunk (ornullif we compress all rows)arrayMapping- the array representation of the mapping (ornullif we compress all rows)newChunkSize- the size of the chunk we want to createdefaultChunkCreator- the chunk creator for a "normal" chunk (if this chunks knows of a better way to sparse itself, it can use it)- Returns:
- the compressed chunk
-
destroyNullFlags
public Runnable destroyNullFlags()
Description copied from interface:IChunkNullableReturns the runnable to run to destroy the nullable flags.- Specified by:
destroyNullFlagsin interfaceIChunkNullable<Double>- Returns:
- the runnable to run to destroy the nullable flags
-
-