Package org.apache.sysds.runtime.data
Class TensorIndexes
- java.lang.Object
-
- org.apache.sysds.runtime.data.TensorIndexes
-
- All Implemented Interfaces:
Externalizable
,Serializable
,Comparable<TensorIndexes>
,org.apache.hadoop.io.Writable
,org.apache.hadoop.io.WritableComparable<TensorIndexes>
public class TensorIndexes extends Object implements org.apache.hadoop.io.WritableComparable<TensorIndexes>, Externalizable
This represent the indexes to the blocks of the tensor. Please note that these indexes are 1-based, whereas the data in the block are zero-based (as they are double arrays).- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TensorIndexes()
TensorIndexes(long[] ix)
TensorIndexes(TensorIndexes indexes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(TensorIndexes other)
boolean
equals(Object other)
long
getIndex(int dim)
long[]
getIndexes()
int
getNumDims()
int
hashCode()
void
readExternal(ObjectInput is)
Redirects the default java serialization via externalizable to our default hadoop writable serialization for consistency/maintainability.void
readFields(DataInput in)
TensorIndexes
setIndexes(long[] ix)
TensorIndexes
setIndexes(TensorIndexes that)
String
toString()
void
write(DataOutput out)
void
writeExternal(ObjectOutput os)
Redirects the default java serialization via externalizable to our default hadoop writable serialization for consistency/maintainability.
-
-
-
Constructor Detail
-
TensorIndexes
public TensorIndexes()
-
TensorIndexes
public TensorIndexes(long[] ix)
-
TensorIndexes
public TensorIndexes(TensorIndexes indexes)
-
-
Method Detail
-
getIndex
public long getIndex(int dim)
-
getIndexes
public long[] getIndexes()
-
getNumDims
public int getNumDims()
-
setIndexes
public TensorIndexes setIndexes(long[] ix)
-
setIndexes
public TensorIndexes setIndexes(TensorIndexes that)
-
compareTo
public int compareTo(TensorIndexes other)
- Specified by:
compareTo
in interfaceComparable<TensorIndexes>
-
readFields
public void readFields(DataInput in) throws IOException
- Specified by:
readFields
in interfaceorg.apache.hadoop.io.Writable
- Throws:
IOException
-
write
public void write(DataOutput out) throws IOException
- Specified by:
write
in interfaceorg.apache.hadoop.io.Writable
- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput is) throws IOException
Redirects the default java serialization via externalizable to our default hadoop writable serialization for consistency/maintainability.- Specified by:
readExternal
in interfaceExternalizable
- Parameters:
is
- object input- Throws:
IOException
- if IOException occurs
-
writeExternal
public void writeExternal(ObjectOutput os) throws IOException
Redirects the default java serialization via externalizable to our default hadoop writable serialization for consistency/maintainability.- Specified by:
writeExternal
in interfaceExternalizable
- Parameters:
os
- object output- Throws:
IOException
- if IOException occurs
-
-