Package com.yahoo.tensor.serialization
Class DenseBinaryFormat
- java.lang.Object
-
- com.yahoo.tensor.serialization.DenseBinaryFormat
-
public class DenseBinaryFormat extends Object
Implementation of a dense binary format for a tensor on the form: Sorted dimensions = num_dimensions [dimension_str_len dimension_str_bytes dimension_size_int]* Cell_values = [double, double, double, ...]* where values are encoded in order of increasing indexes in each dimension, increasing indexes of later dimensions in the dimension type before earlier.- Author:
- bratseth
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tensor
decode(Optional<TensorType> optionalType, GrowableByteBuffer buffer)
void
encode(GrowableByteBuffer buffer, Tensor tensor)
-
-
-
Method Detail
-
encode
public void encode(GrowableByteBuffer buffer, Tensor tensor)
-
decode
public Tensor decode(Optional<TensorType> optionalType, GrowableByteBuffer buffer)
-
-