java.lang.Object
com.google.flatbuffers.Table
org.apache.arrow.flatbuf.SparseTensorIndexCSF
public final class SparseTensorIndexCSF
extends com.google.flatbuffers.Table
Compressed Sparse Fiber (CSF) sparse tensor index.
- 
Nested Class SummaryNested Classes
- 
Field SummaryFields inherited from class com.google.flatbuffers.Tablebb, bb_pos
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescription__assign(int _i, ByteBuffer _bb) void__init(int _i, ByteBuffer _bb) static voidaddAxisOrder(com.google.flatbuffers.FlatBufferBuilder builder, int axisOrderOffset) static voidaddIndicesBuffers(com.google.flatbuffers.FlatBufferBuilder builder, int indicesBuffersOffset) static voidaddIndicesType(com.google.flatbuffers.FlatBufferBuilder builder, int indicesTypeOffset) static voidaddIndptrBuffers(com.google.flatbuffers.FlatBufferBuilder builder, int indptrBuffersOffset) static voidaddIndptrType(com.google.flatbuffers.FlatBufferBuilder builder, int indptrTypeOffset) intaxisOrder(int j) axisOrder stores the sequence in which dimensions were traversed to produce the prefix tree.intcom.google.flatbuffers.IntVectorcom.google.flatbuffers.IntVectoraxisOrderVector(com.google.flatbuffers.IntVector obj) static intcreateAxisOrderVector(com.google.flatbuffers.FlatBufferBuilder builder, int[] data) static intcreateSparseTensorIndexCSF(com.google.flatbuffers.FlatBufferBuilder builder, int indptrTypeOffset, int indptrBuffersOffset, int indicesTypeOffset, int indicesBuffersOffset, int axisOrderOffset) static intendSparseTensorIndexCSF(com.google.flatbuffers.FlatBufferBuilder builder) static SparseTensorIndexCSFstatic SparseTensorIndexCSFindicesBuffers(int j) indicesBuffers stores values of nodes.indicesBuffers(Buffer obj, int j) intThe type of values in indicesBuffersindicesType(Int obj) indptrBuffers(int j) indptrBuffers stores the sparsity structure.indptrBuffers(Buffer obj, int j) intCSF is a generalization of compressed sparse row (CSR) index.indptrType(Int obj) static voidstartAxisOrderVector(com.google.flatbuffers.FlatBufferBuilder builder, int numElems) static voidstartIndicesBuffersVector(com.google.flatbuffers.FlatBufferBuilder builder, int numElems) static voidstartIndptrBuffersVector(com.google.flatbuffers.FlatBufferBuilder builder, int numElems) static voidstartSparseTensorIndexCSF(com.google.flatbuffers.FlatBufferBuilder builder) static voidMethods inherited from class com.google.flatbuffers.Table__has_identifier, __indirect, __indirect, __offset, __offset, __reset, __reset, __string, __string, __union, __union, __vector, __vector_as_bytebuffer, __vector_in_bytebuffer, __vector_len, compareStrings, compareStrings, getByteBuffer, keysCompare, sortTables
- 
Constructor Details- 
SparseTensorIndexCSFpublic SparseTensorIndexCSF()
 
- 
- 
Method Details- 
ValidateVersionpublic static void ValidateVersion()
- 
getRootAsSparseTensorIndexCSF
- 
getRootAsSparseTensorIndexCSFpublic static SparseTensorIndexCSF getRootAsSparseTensorIndexCSF(ByteBuffer _bb, SparseTensorIndexCSF obj) 
- 
__init
- 
__assign
- 
indptrTypeCSF is a generalization of compressed sparse row (CSR) index. See [smith2017knl](http://shaden.io/pub-files/smith2017knl.pdf) CSF index recursively compresses each dimension of a tensor into a set of prefix trees. Each path from a root to leaf forms one tensor non-zero index. CSF is implemented with two arrays of buffers and one arrays of integers. For example, let X be a 2x3x4x5 tensor and let it have the following 8 non-zero values: ```text X[0, 0, 0, 1] := 1 X[0, 0, 0, 2] := 2 X[0, 1, 0, 0] := 3 X[0, 1, 0, 2] := 4 X[0, 1, 1, 0] := 5 X[1, 1, 1, 0] := 6 X[1, 1, 1, 1] := 7 X[1, 1, 1, 2] := 8 ``` As a prefix tree this would be represented as: ```text 0 1 / \ | 0 1 1 / / \ | 0 0 1 1 /| /| | /| | 1 2 0 2 0 0 1 2 ``` The type of values in indptrBuffers
- 
indptrType
- 
indptrBuffersindptrBuffers stores the sparsity structure. Each two consecutive dimensions in a tensor correspond to a buffer in indptrBuffers. A pair of consecutive values at `indptrBuffers[dim][i]` and `indptrBuffers[dim][i + 1]` signify a range of nodes in `indicesBuffers[dim + 1]` who are children of `indicesBuffers[dim][i]` node. For example, the indptrBuffers for the above X is: ```text indptrBuffer(X) = [ [0, 2, 3], [0, 1, 3, 4], [0, 2, 4, 5, 8] ]. ```
- 
indptrBuffers
- 
indptrBuffersLengthpublic int indptrBuffersLength()
- 
indptrBuffersVector
- 
indptrBuffersVector
- 
indicesTypeThe type of values in indicesBuffers
- 
indicesType
- 
indicesBuffersindicesBuffers stores values of nodes. Each tensor dimension corresponds to a buffer in indicesBuffers. For example, the indicesBuffers for the above X is: ```text indicesBuffer(X) = [ [0, 1], [0, 1, 1], [0, 0, 1, 1], [1, 2, 0, 2, 0, 0, 1, 2] ]. ```
- 
indicesBuffers
- 
indicesBuffersLengthpublic int indicesBuffersLength()
- 
indicesBuffersVector
- 
indicesBuffersVector
- 
axisOrderpublic int axisOrder(int j) axisOrder stores the sequence in which dimensions were traversed to produce the prefix tree. For example, the axisOrder for the above X is: ```text axisOrder(X) = [0, 1, 2, 3]. ```
- 
axisOrderLengthpublic int axisOrderLength()
- 
axisOrderVectorpublic com.google.flatbuffers.IntVector axisOrderVector()
- 
axisOrderVectorpublic com.google.flatbuffers.IntVector axisOrderVector(com.google.flatbuffers.IntVector obj) 
- 
axisOrderAsByteBuffer
- 
axisOrderInByteBuffer
- 
createSparseTensorIndexCSFpublic static int createSparseTensorIndexCSF(com.google.flatbuffers.FlatBufferBuilder builder, int indptrTypeOffset, int indptrBuffersOffset, int indicesTypeOffset, int indicesBuffersOffset, int axisOrderOffset) 
- 
startSparseTensorIndexCSFpublic static void startSparseTensorIndexCSF(com.google.flatbuffers.FlatBufferBuilder builder) 
- 
addIndptrTypepublic static void addIndptrType(com.google.flatbuffers.FlatBufferBuilder builder, int indptrTypeOffset) 
- 
addIndptrBufferspublic static void addIndptrBuffers(com.google.flatbuffers.FlatBufferBuilder builder, int indptrBuffersOffset) 
- 
startIndptrBuffersVectorpublic static void startIndptrBuffersVector(com.google.flatbuffers.FlatBufferBuilder builder, int numElems) 
- 
addIndicesTypepublic static void addIndicesType(com.google.flatbuffers.FlatBufferBuilder builder, int indicesTypeOffset) 
- 
addIndicesBufferspublic static void addIndicesBuffers(com.google.flatbuffers.FlatBufferBuilder builder, int indicesBuffersOffset) 
- 
startIndicesBuffersVectorpublic static void startIndicesBuffersVector(com.google.flatbuffers.FlatBufferBuilder builder, int numElems) 
- 
addAxisOrderpublic static void addAxisOrder(com.google.flatbuffers.FlatBufferBuilder builder, int axisOrderOffset) 
- 
createAxisOrderVectorpublic static int createAxisOrderVector(com.google.flatbuffers.FlatBufferBuilder builder, int[] data) 
- 
startAxisOrderVectorpublic static void startAxisOrderVector(com.google.flatbuffers.FlatBufferBuilder builder, int numElems) 
- 
endSparseTensorIndexCSFpublic static int endSparseTensorIndexCSF(com.google.flatbuffers.FlatBufferBuilder builder) 
 
-