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
`TensorIndexes()`
`TensorIndexes​(long[] ix)`
`TensorIndexes​(TensorIndexes indexes)`

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `compareTo​(TensorIndexes other)`
`boolean` `equals​(Object other)`
`long` `getIndex​(int dim)`
`long[]` `getIndexes()`
`int` `getNumDims()`
`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)`
`TensorIndexes` `setIndexes​(long[] ix)`
`TensorIndexes` `setIndexes​(TensorIndexes 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`

### 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:
  `compareTo` in interface `Comparable<TensorIndexes>`

#### equals

    public boolean equals​(Object other)

Overrides:
  `equals` in class `Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

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