Class FloatArrayExpansionKernel
java.lang.Object
io.deephaven.extensions.barrage.chunk.array.FloatArrayExpansionKernel
- All Implemented Interfaces:
ArrayExpansionKernel
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T,
A extends Any>
WritableObjectChunk<T,A> contract
(Chunk<A> source, IntChunk<ChunkPositions> perElementLengthDest, WritableChunk<A> outChunk, int outOffset, int totalRows) This contracts the source from a pair ofLongChunk
andChunk<T>
and produces aChunk<T[]>
.<T,
A extends Any>
WritableChunk<A>expand
(ObjectChunk<T, A> source, WritableIntChunk<ChunkPositions> perElementLengthDest) This expands the source from aT[]
per element to a flatT
per element.
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
FloatArrayExpansionKernel
public FloatArrayExpansionKernel()
-
-
Method Details
-
expand
public <T,A extends Any> WritableChunk<A> expand(ObjectChunk<T, A> source, WritableIntChunk<ChunkPositions> perElementLengthDest) Description copied from interface:ArrayExpansionKernel
This expands the source from aT[]
per element to a flatT
per element. The kernel records the number of consecutive elements that belong to a row inperElementLengthDest
. The returned chunk is owned by the caller.- Specified by:
expand
in interfaceArrayExpansionKernel
- Parameters:
source
- the source chunk of T[] to expandperElementLengthDest
- the destination IntChunk for whichdest.get(i + 1) - dest.get(i)
is equivalent tosource.get(i).length
- Returns:
- an unrolled/flattened chunk of T
-
contract
public <T,A extends Any> WritableObjectChunk<T,A> contract(Chunk<A> source, IntChunk<ChunkPositions> perElementLengthDest, WritableChunk<A> outChunk, int outOffset, int totalRows) Description copied from interface:ArrayExpansionKernel
This contracts the source from a pair ofLongChunk
andChunk<T>
and produces aChunk<T[]>
. The returned chunk is owned by the caller.- Specified by:
contract
in interfaceArrayExpansionKernel
- Parameters:
source
- the source chunk of T to contractperElementLengthDest
- the source IntChunk for whichdest.get(i + 1) - dest.get(i)
is equivalent tosource.get(i).length
outChunk
- the returned chunk from an earlier record batchoutOffset
- the offset to start writing intooutChunk
totalRows
- the total known rows for this column; if known (else 0)- Returns:
- a result chunk of T[]
-