Interface GenericMatrixAccess<F extends Field<F>>

  • Type Parameters:
    F - the number Field
    All Known Subinterfaces:
    GenericMatrix<T,​F>
    All Known Implementing Classes:
    ComplexMatrix, GenericFieldMatrix, RealMatrix

    public interface GenericMatrixAccess<F extends Field<F>>
    This interface defines the methods for accessing entries in a matrix over a field. Indices count from 1, e.g., get(1,1). This is what mathematicians (not programmers) are accustomed to. Invalid access such as using out-of-range indices or altering immutable matrix will lead to MatrixAccessException. The only way to change a matrix is by calling set(int, int, dev.nm.algebra.structure.Field). Other operations that "change" the matrix actually creates a new and independent copy.
    See Also:
    Field
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      F get​(int i, int j)
      Get the matrix entry at [i,j].
      void set​(int i, int j, F value)
      Set the matrix entry at [i,j] to a value.
    • Method Detail

      • set

        void set​(int i,
                 int j,
                 F value)
          throws MatrixAccessException
        Set the matrix entry at [i,j] to a value. This is the only method that may change a matrix.
        Parameters:
        i - the row index
        j - the column index
        value - the value to set A[i,j] to
        Throws:
        MatrixAccessException - if i or j is out of range
      • get

        F get​(int i,
              int j)
        throws MatrixAccessException
        Get the matrix entry at [i,j].
        Parameters:
        i - the row index
        j - the column index
        Returns:
        A[i,j]
        Throws:
        MatrixAccessException - if i or j is out of range