public static class ShortVector.ShortSerializer extends Object implements ByteBufferSerializer<ShortVector>
Short.MAX_VALUE
dimensions, by using a short for storing the
dimensionality.Constructor and Description |
---|
ShortVector.ShortSerializer() |
Modifier and Type | Method and Description |
---|---|
ShortVector |
fromByteBuffer(ByteBuffer buffer)
Deserialize an object from a byte buffer (e.g. disk)
|
int |
getByteSize(ShortVector vec)
Get the size of the object in bytes.
|
void |
toByteBuffer(ByteBuffer buffer,
ShortVector vec)
Serialize the object to a byte array (e.g. disk)
|
public ShortVector fromByteBuffer(ByteBuffer buffer) throws IOException
ByteBufferSerializer
fromByteBuffer
in interface ByteBufferSerializer<ShortVector>
buffer
- Data array to processIOException
- on IO errorspublic void toByteBuffer(ByteBuffer buffer, ShortVector vec) throws IOException
ByteBufferSerializer
toByteBuffer
in interface ByteBufferSerializer<ShortVector>
buffer
- Buffer to serialize tovec
- Object to serializeIOException
- on IO errorspublic int getByteSize(ShortVector vec)
ByteBufferSerializer
getByteSize
in interface ByteBufferSerializer<ShortVector>
vec
- Object to serializeCopyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.