public class NDArrayWritable extends ArrayWritable implements WritableComparable
| Modifier and Type | Field and Description |
|---|---|
static byte |
NDARRAY_SER_VERSION_HEADER |
static byte |
NDARRAY_SER_VERSION_HEADER_NULL |
| Constructor and Description |
|---|
NDArrayWritable() |
NDArrayWritable(INDArray array) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Object o) |
boolean |
equals(Object o)
Returns true iff
o is a ArrayWritable with the same value. |
INDArray |
get() |
double |
getDouble(long i) |
float |
getFloat(long i) |
int |
getInt(long i) |
long |
getLong(long i) |
WritableType |
getType()
Get the type of the writable.
|
int |
hashCode() |
long |
length() |
void |
readFields(DataInput in)
Deserialize into a row vector of default type.
|
void |
set(INDArray array) |
String |
toString() |
void |
write(DataOutput out)
Serialize array data linearly.
|
void |
writeType(DataOutput out)
Write the type (a single short value) to the DataOutput.
|
toDouble, toFloat, toInt, toLongpublic static final byte NDARRAY_SER_VERSION_HEADER_NULL
public static final byte NDARRAY_SER_VERSION_HEADER
public NDArrayWritable()
public NDArrayWritable(INDArray array)
public void readFields(DataInput in) throws IOException
readFields in interface Writablein - DataInput to deseriablize this object from.IOExceptionpublic void writeType(DataOutput out) throws IOException
WritableWritableFactory for details.writeType in interface Writableout - DataOutput to write toIOException - For errors during writingpublic WritableType getType()
Writablepublic void write(DataOutput out) throws IOException
write in interface Writableout - DataOuput to serialize this object into.IOExceptionpublic void set(INDArray array)
public INDArray get()
public boolean equals(Object o)
o is a ArrayWritable with the same value.public int compareTo(@NonNull
Object o)
compareTo in interface Comparablepublic long length()
length in class ArrayWritablepublic double getDouble(long i)
getDouble in class ArrayWritablepublic float getFloat(long i)
getFloat in class ArrayWritablepublic int getInt(long i)
getInt in class ArrayWritablepublic long getLong(long i)
getLong in class ArrayWritableCopyright © 2019. All rights reserved.