org.firstinspires.ftc.robotcore.external.matrices

## Class DenseMatrixF

- java.lang.Object
- - org.firstinspires.ftc.robotcore.external.matrices.MatrixF
  - - org.firstinspires.ftc.robotcore.external.matrices.DenseMatrixF

- Direct Known Subclasses:
    ColumnMajorMatrixF, RowMajorMatrixF

      public abstract class DenseMatrixF
      extends MatrixF

  A `DenseMatrixF` is a matrix of floats whose storage is a contiguous float[] array. It may logically be ranged arranged either in row or column major order.
  See Also:
    `MatrixF`, `RowMajorMatrixF`, `ColumnMajorMatrixF`, `SliceMatrixF`

- - ### Field Summary

    - ### Fields inherited from class org.firstinspires.ftc.robotcore.external.matrices.MatrixF

      `numCols, numRows`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `DenseMatrixF(int nRows, int nCols)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `float` | `get(int row, int col)` Returns a particular element of this matrix
    `abstract float[]` | `getData()` Returns the contiguous array of floats which is the storage for this matrix
    `protected abstract int` | `indexFromRowCol(int row, int col)` Given a row and column index into the matrix, returns the corresponding index into the underlying float[] array.
    `void` | `put(int row, int col, float value)` Updates a particular element of this matrix

    - ### Methods inherited from class org.firstinspires.ftc.robotcore.external.matrices.MatrixF

      `adaptHomogeneous, add, add, add, added, added, added, diagonalMatrix, diagonalMatrix, dimensionsError, dimensionsError, emptyMatrix, formatAsTransform, formatAsTransform, getColumn, getRow, getTranslation, identityMatrix, inverted, multiplied, multiplied, multiplied, multiplied, multiply, multiply, multiply, multiply, numCols, numRows, slice, slice, subtract, subtract, subtract, subtracted, subtracted, subtracted, toString, toVector, transform, transposed`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### DenseMatrixF

          protected DenseMatrixF(int nRows,
                                 int nCols)

  - ### Method Detail

    - #### get

          public float get(int row,
                           int col)

      Description copied from class: `MatrixF`
      Returns a particular element of this matrix
      Specified by:
        `get` in class `MatrixF`
      Parameters:
        `row` - the index of the row of the element to return
        `col` - the index of the column of the element to return
      Returns:
        the element at the indicated row and column
      See Also:
        `MatrixF.put(int, int, float)`

    - #### put

          public void put(int row,
                          int col,
                          float value)

      Description copied from class: `MatrixF`
      Updates a particular element of this matrix
      Specified by:
        `put` in class `MatrixF`
      Parameters:
        `row` - the index of the row of the element to update
        `col` - the index of the column of the element to update
        `value` - the new value for the indicated element

    - #### getData

          public abstract float[] getData()

      Returns the contiguous array of floats which is the storage for this matrix
      Returns:
        the contiguous array of floats which is the storage for this matrix

    - #### indexFromRowCol

          protected abstract int indexFromRowCol(int row,
                                                 int col)

      Given a row and column index into the matrix, returns the corresponding index into the underlying float[] array.
      Parameters:
        `row` - the row whose index is desired
        `col` - the column whose index is desired
      Returns:
        the index of (row,col) in the data returned by `getData()`