org.apache.ignite.ml.math.primitives.matrix

## Interface MatrixStorage

- All Superinterfaces:
    Destroyable, Externalizable, Serializable, StorageOpsMetrics
  All Known Implementing Classes:
    DenseMatrixStorage, SparseMatrixStorage, ViewMatrixStorage

      public interface MatrixStorage
      extends Externalizable, StorageOpsMetrics, Destroyable

  Data storage support for `Matrix`.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `accessMode()`
    `int` | `columnSize()`
    `default double[]` | `data()` Gets underlying data, if `StorageOpsMetrics.isArrayBased()` returns `false` this method return copy of data.
    `double` | `get(int x, int y)`
    `default boolean` | `isNumeric()`
    `int` | `rowSize()`
    `void` | `set(int x, int y, double v)`
    `int` | `storageMode()`

    - ### Methods inherited from interface java.io.Externalizable

      `readExternal, writeExternal`

    - ### Methods inherited from interface org.apache.ignite.ml.math.StorageOpsMetrics

      `isArrayBased, isDense`

    - ### Methods inherited from interface org.apache.ignite.ml.math.Destroyable

      `destroy`

- - ### Method Detail

    - #### get

          double get(int x,
                     int y)

      Parameters:
        `x` - Matrix row index.
        `y` - Matrix column index.
      Returns:
        Value corresponding to given row and column.

    - #### set

          void set(int x,
                   int y,
                   double v)

      Parameters:
        `x` - Matrix row index.
        `y` - Matrix column index.
        `v` - Value to set at given row and column.

    - #### columnSize

          int columnSize()

    - #### rowSize

          int rowSize()

    - #### storageMode

          int storageMode()

      Returns:
        Matrix elements storage mode.
      See Also:
        `StorageConstants`

    - #### accessMode

          int accessMode()

      Returns:
        Matrix access mode.
      See Also:
        `StorageConstants`

    - #### data

          default double[] data()

      Gets underlying data, if `StorageOpsMetrics.isArrayBased()` returns `false` this method return copy of data. The data must be adapted for `Blas`.
      See Also:
        `StorageOpsMetrics.isArrayBased()`

    - #### isNumeric

          default boolean isNumeric()

      Specified by:
        `isNumeric` in interface `StorageOpsMetrics`
      Returns:
        true if all stored data are values of Number class.

2020 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.9.1
Release Date | : December 9 2020