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