public static class SparseDoubleVector.VariableSerializer extends java.lang.Object implements ByteBufferSerializer<SparseDoubleVector>
Constructor and Description |
---|
VariableSerializer() |
Modifier and Type | Method and Description |
---|---|
SparseDoubleVector |
fromByteBuffer(java.nio.ByteBuffer buffer)
Deserialize an object from a byte buffer (e.g. disk)
|
int |
getByteSize(SparseDoubleVector vec)
Get the size of the object in bytes.
|
void |
toByteBuffer(java.nio.ByteBuffer buffer,
SparseDoubleVector vec)
Serialize the object to a byte array (e.g. disk)
|
public SparseDoubleVector fromByteBuffer(java.nio.ByteBuffer buffer) throws java.io.IOException
ByteBufferSerializer
fromByteBuffer
in interface ByteBufferSerializer<SparseDoubleVector>
buffer
- Data array to processjava.io.IOException
- on IO errorspublic void toByteBuffer(java.nio.ByteBuffer buffer, SparseDoubleVector vec) throws java.io.IOException
ByteBufferSerializer
toByteBuffer
in interface ByteBufferSerializer<SparseDoubleVector>
buffer
- Buffer to serialize tovec
- Object to serializejava.io.IOException
- on IO errorspublic int getByteSize(SparseDoubleVector vec)
ByteBufferSerializer
getByteSize
in interface ByteBufferSerializer<SparseDoubleVector>
vec
- Object to serializeCopyright © 2019 ELKI Development Team. License information.