public class NDArrayWritable extends ArrayWritable implements WritableComparable
| Modifier and Type | Class and Description |
|---|---|
static class |
NDArrayWritable.Comparator
A Comparator optimized for ArrayWritable.
|
| Constructor and Description |
|---|
NDArrayWritable() |
NDArrayWritable(org.nd4j.linalg.api.ndarray.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. |
org.nd4j.linalg.api.ndarray.INDArray |
get() |
double |
getDouble(long i) |
float |
getFloat(long i) |
int |
getInt(long i) |
long |
getLong(long i) |
int |
hashCode() |
long |
length() |
void |
readFields(DataInput in)
Deserialize into a row vector of default type.
|
void |
set(org.nd4j.linalg.api.ndarray.INDArray array) |
String |
toString() |
void |
write(DataOutput out)
Serialize array data linearly.
|
toDouble, toFloat, toInt, toLongpublic NDArrayWritable()
public NDArrayWritable(org.nd4j.linalg.api.ndarray.INDArray array)
public void readFields(DataInput in) throws IOException
readFields in interface WritableIOExceptionpublic void write(DataOutput out) throws IOException
write in interface WritableIOExceptionpublic void set(org.nd4j.linalg.api.ndarray.INDArray array)
public org.nd4j.linalg.api.ndarray.INDArray get()
public boolean equals(Object o)
o is a ArrayWritable with the same value.public int compareTo(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 © 2016. All rights reserved.