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 int
compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2)
int
compare(MatrixIndexes m1, MatrixIndexes m2)
int
compareTo(MatrixIndexes other)
boolean
equals(Object other)
long
getColumnIndex()
long
getRowIndex()
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)
MatrixIndexes
setIndexes(long r, long c)
MatrixIndexes
setIndexes(MatrixIndexes 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.-
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:
compareTo
in interfaceComparable<MatrixIndexes>
-
equals
public boolean equals(Object other)
- Specified by:
equals
in interfaceComparator<MatrixIndexes>
- Overrides:
equals
in classObject
-
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
-
compare
public int compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2)
- Specified by:
compare
in interfaceorg.apache.hadoop.io.RawComparator<MatrixIndexes>
-
compare
public int compare(MatrixIndexes m1, MatrixIndexes m2)
- Specified by:
compare
in interfaceComparator<MatrixIndexes>
-
-