Class MatrixIndexes
- java.lang.Object
-
- org.apache.sysds.runtime.matrix.data.MatrixIndexes
-
- All Implemented Interfaces:
Externalizable,Serializable,Comparable<MatrixIndexes>,Comparator<MatrixIndexes>,org.apache.hadoop.io.RawComparator<MatrixIndexes>,org.apache.hadoop.io.Writable,org.apache.hadoop.io.WritableComparable<MatrixIndexes>
public class MatrixIndexes extends Object implements org.apache.hadoop.io.WritableComparable<MatrixIndexes>, org.apache.hadoop.io.RawComparator<MatrixIndexes>, Externalizable
This represent the indexes to the blocks of the matrix. 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 MatrixIndexes()MatrixIndexes(long r, long c)MatrixIndexes(MatrixIndexes indexes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2)intcompare(MatrixIndexes m1, MatrixIndexes m2)intcompareTo(MatrixIndexes other)booleanequals(Object other)longgetColumnIndex()longgetRowIndex()inthashCode()voidreadExternal(ObjectInput is)Redirects the default java serialization via externalizable to our default hadoop writable serialization for consistency/maintainability.voidreadFields(DataInput in)MatrixIndexessetIndexes(long r, long c)MatrixIndexessetIndexes(MatrixIndexes that)StringtoString()voidwrite(DataOutput out)voidwriteExternal(ObjectOutput os)Redirects the default java serialization via externalizable to our default hadoop writable serialization for consistency/maintainability.-
Methods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Constructor Detail
-
MatrixIndexes
public MatrixIndexes()
-
MatrixIndexes
public MatrixIndexes(long r, long c)
-
MatrixIndexes
public MatrixIndexes(MatrixIndexes indexes)
-
-
Method Detail
-
getRowIndex
public long getRowIndex()
-
getColumnIndex
public long getColumnIndex()
-
setIndexes
public MatrixIndexes setIndexes(long r, long c)
-
setIndexes
public MatrixIndexes setIndexes(MatrixIndexes that)
-
compareTo
public int compareTo(MatrixIndexes other)
- Specified by:
compareToin interfaceComparable<MatrixIndexes>
-
equals
public boolean equals(Object other)
- Specified by:
equalsin interfaceComparator<MatrixIndexes>- Overrides:
equalsin classObject
-
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
-
compare
public int compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2)- Specified by:
comparein interfaceorg.apache.hadoop.io.RawComparator<MatrixIndexes>
-
compare
public int compare(MatrixIndexes m1, MatrixIndexes m2)
- Specified by:
comparein interfaceComparator<MatrixIndexes>
-
-