Package org.ejml.data

Interface DMatrixSparse

All Superinterfaces:
DMatrix, Matrix, MatrixSparse, ReshapeMatrix, Serializable
All Known Implementing Classes:
DMatrixSparseCSC, DMatrixSparseTriplet

public interface DMatrixSparse extends DMatrix, MatrixSparse
High level interface for sparse matrices double types.
  • Method Details

    • get

      double get(int row, int col, double fallBackValue)
      Returns the value of value of the specified matrix element.
      Parameters:
      row - Matrix element's row index..
      col - Matrix element's column index.
      fallBackValue - Value to return, if the matrix element is not assigned
      Returns:
      The specified element's value.
    • unsafe_get

      double unsafe_get(int row, int col, double fallBackValue)
      Same as get(int, int, double) but does not perform bounds check on input parameters. This results in about a 25% speed increase but potentially sacrifices stability and makes it more difficult to track down simple errors. It is not recommended that this function be used, except in highly optimized code where the bounds are implicitly being checked.
      Parameters:
      row - Matrix element's row index..
      col - Matrix element's column index.
      fallBackValue - Value to return, if the matrix element is not assigned
      Returns:
      The specified element's value or the fallBackValue, if the element is not assigned.
    • createCoordinateIterator

      Iterator<DMatrixSparse.CoordinateRealValue> createCoordinateIterator()
      Creates an iterator which will go through each non-zero value in the sparse matrix. Order is not defined and is implementation specific