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 intcompareTo(TensorIndexes other)booleanequals(Object other)longgetIndex(int dim)long[]getIndexes()intgetNumDims()inthashCode()voidreadExternal(ObjectInput is)Redirects the default java serialization via externalizable to our default hadoop writable serialization for consistency/maintainability.voidreadFields(DataInput in)TensorIndexessetIndexes(long[] ix)TensorIndexessetIndexes(TensorIndexes that)StringtoString()voidwrite(DataOutput out)voidwriteExternal(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:
compareToin interfaceComparable<TensorIndexes>
-
readFields
public void readFields(DataInput in) throws IOException
- Specified by:
readFieldsin interfaceorg.apache.hadoop.io.Writable- Throws:
IOException
-
write
public void write(DataOutput out) throws IOException
- Specified by:
writein 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:
readExternalin 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:
writeExternalin interfaceExternalizable- Parameters:
os- object output- Throws:
IOException- if IOException occurs
-
-