Package org.apache.sysds.runtime.matrix.data

# 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

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)`
`MatrixIndexes`
`fromString(String ix)`
`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 class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

### 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

public MatrixIndexes(MatrixIndexes indexes)

## Method Details

### 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 interface `Comparable<MatrixIndexes>`

### equals

public boolean equals(Object other)

Specified by:
  `equals` in interface `Comparator<MatrixIndexes>`
Overrides:
  `equals` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`

### toString

public String toString()

Overrides:
  `toString` in class `Object`

### fromString

public MatrixIndexes fromString(String ix)

### readFields

public void readFields(DataInput in) throws IOException

Specified by:
  `readFields` in interface `org.apache.hadoop.io.Writable`
Throws:
  `IOException`

### write

public void write(DataOutput out) throws IOException

Specified by:
  `write` in interface `org.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 interface `Externalizable`
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 interface `Externalizable`
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 interface `org.apache.hadoop.io.RawComparator<MatrixIndexes>`

### compare

public int compare(MatrixIndexes m1, MatrixIndexes m2)

Specified by:
  `compare` in interface `Comparator<MatrixIndexes>`