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:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2) intcompare(MatrixIndexes m1, MatrixIndexes m2) intcompareTo(MatrixIndexes other) booleanfromString(String ix) longlonginthashCode()voidRedirects the default java serialization via externalizable to our default hadoop writable serialization for consistency/maintainability.voidreadFields(DataInput in) setIndexes(long r, long c) setIndexes(MatrixIndexes that) toString()voidwrite(DataOutput out) voidRedirects 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 Details
-
MatrixIndexes
public MatrixIndexes() -
MatrixIndexes
public MatrixIndexes(long r, long c) -
MatrixIndexes
-
-
Method Details
-
getRowIndex
public long getRowIndex() -
getColumnIndex
public long getColumnIndex() -
setIndexes
-
setIndexes
-
compareTo
- Specified by:
compareToin interfaceComparable<MatrixIndexes>
-
equals
- Specified by:
equalsin interfaceComparator<MatrixIndexes>- Overrides:
equalsin classObject
-
hashCode
public int hashCode() -
toString
-
fromString
-
readFields
- Specified by:
readFieldsin interfaceorg.apache.hadoop.io.Writable- Throws:
IOException
-
write
- Specified by:
writein interfaceorg.apache.hadoop.io.Writable- Throws:
IOException
-
readExternal
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
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
- Specified by:
comparein interfaceComparator<MatrixIndexes>
-