Class DoubleVectorExpansionKernel
java.lang.Object
io.deephaven.barrage.chunk.vector.DoubleVectorExpansionKernel
- All Implemented Interfaces:
VectorExpansionKernel
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<A extends Attributes.Any>
WritableObjectChunk<DbArrayBase,A> contract(Chunk<A> source, IntChunk<Attributes.ChunkPositions> perElementLengthDest, WritableChunk<A> outChunk, int outOffset, int totalRows) This contracts the source from a pair ofLongChunkandChunk<T>and produces aChunk<T[]>.<A extends Attributes.Any>
WritableChunk<A>expand(ObjectChunk<DbArrayBase, A> source, WritableIntChunk<Attributes.ChunkPositions> perElementLengthDest) This expands the source from aTVectorper element to a flatTper element.
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
DoubleVectorExpansionKernel
public DoubleVectorExpansionKernel()
-
-
Method Details
-
expand
public <A extends Attributes.Any> WritableChunk<A> expand(ObjectChunk<DbArrayBase, A> source, WritableIntChunk<Attributes.ChunkPositions> perElementLengthDest) Description copied from interface:VectorExpansionKernelThis expands the source from aTVectorper element to a flatTper 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:
expandin interfaceVectorExpansionKernel- Parameters:
source- the source chunk of TVector 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 <A extends Attributes.Any> WritableObjectChunk<DbArrayBase,A> contract(Chunk<A> source, IntChunk<Attributes.ChunkPositions> perElementLengthDest, WritableChunk<A> outChunk, int outOffset, int totalRows) Description copied from interface:VectorExpansionKernelThis contracts the source from a pair ofLongChunkandChunk<T>and produces aChunk<T[]>. The returned chunk is owned by the caller.- Specified by:
contractin interfaceVectorExpansionKernel- 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).lengthoutChunk- the returned chunk from an earlier record batchoutOffset- the offset to start writing intooutChunktotalRows- the total known rows for this column; if known (else 0)- Returns:
- a result chunk of T[]
-