Class SparseMatrix.Entry

  • Enclosing interface:
    SparseMatrix

    public static final class SparseMatrix.Entry
    extends Object
    This is a (non-zero) entry in a sparse matrix.

    This class is immutable.

    • Field Detail

      • ROW_MAJOR_ORDER

        public static final Comparator<SparseMatrix.Entry> ROW_MAJOR_ORDER
        This Comparator sorts the matrix coordinates first from top to bottom (rows), and then from left to right (columns).
      • coordinates

        public final MatrixCoordinate coordinates
        the coordinates of this entry
      • value

        public final double value
        the entry value
    • Constructor Detail

      • Entry

        public Entry​(MatrixCoordinate coordinates,
                     double value)
        Construct a sparse entry in a sparse matrix.
        Parameters:
        coordinates - the entry coordinates
        value - the entry value