Class TiledMatrix<E>

java.lang.Object
org.episteme.core.mathematics.linearalgebra.matrices.GenericMatrix<E>
org.episteme.core.mathematics.linearalgebra.matrices.TiledMatrix<E>
All Implemented Interfaces:
AutoCloseable, Matrix<E>, AbelianGroup<Matrix<E>>, AbelianMonoid<Matrix<E>>, Group<Matrix<E>>, Magma<Matrix<E>>, Monoid<Matrix<E>>, Ring<Matrix<E>>, Semiring<Matrix<E>>, Set<Matrix<E>>, Module<Matrix<E>, E>

public class TiledMatrix<E> extends GenericMatrix<E> implements AutoCloseable
A matrix decomposed into smaller tiles (blocks). This structure is optimized for cache-local computations and distributed processing.
Since:
1.1
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Constructor Details

    • TiledMatrix

      public TiledMatrix(Matrix<E> original, int tileRows, int tileCols)
      Creates a TiledMatrix from an existing matrix.
    • TiledMatrix

      public TiledMatrix(int rows, int cols, int tileSize, Ring<E> ring)
      Creates an empty TiledMatrix with specified dimensions.
  • Method Details

    • rows

      public int rows()
      Description copied from interface: Matrix
      Returns the number of rows in this matrix.
      Specified by:
      rows in interface Matrix<E>
      Overrides:
      rows in class GenericMatrix<E>
    • cols

      public int cols()
      Description copied from interface: Matrix
      Returns the number of columns in this matrix.
      Specified by:
      cols in interface Matrix<E>
      Overrides:
      cols in class GenericMatrix<E>
    • get

      public E get(int row, int col)
      Description copied from interface: Matrix
      Returns the element at the specified row and column.
      Specified by:
      get in interface Matrix<E>
      Overrides:
      get in class GenericMatrix<E>
    • set

      public void set(int row, int col, E value)
      Overrides:
      set in class GenericMatrix<E>
    • getTile

      public Matrix<E> getTile(int i, int j)
    • getNumTileRows

      public int getNumTileRows()
    • getNumTileCols

      public int getNumTileCols()
    • getTileSize

      public int getTileSize()
    • setTile

      public void setTile(int i, int j, Matrix<E> tile)
    • updateTile

      public void updateTile(int i, int j, Matrix<E> delta)
      Thread-safe update of a tile (adds delta to current tile).
    • getSubTiledMatrix

      public TiledMatrix<E> getSubTiledMatrix(int startTileRow, int endTileRow, int startTileCol, int endTileCol)
      Returns a sub-tiled matrix representing a portion of this tiled matrix. Dimensions are in terms of tiles.
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable