Class SparseMatrix.Entry
- java.lang.Object
-
- dev.nm.algebra.linear.matrix.doubles.matrixtype.sparse.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 Summary
Fields Modifier and Type Field Description MatrixCoordinate
coordinates
the coordinates of this entrystatic Comparator<SparseMatrix.Entry>
ROW_MAJOR_ORDER
ThisComparator
sorts the matrix coordinates first from top to bottom (rows), and then from left to right (columns).double
value
the entry value
-
Constructor Summary
Constructors Constructor Description Entry(MatrixCoordinate coordinates, double value)
Construct a sparse entry in a sparse matrix.
-
-
-
Field Detail
-
ROW_MAJOR_ORDER
public static final Comparator<SparseMatrix.Entry> ROW_MAJOR_ORDER
ThisComparator
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 coordinatesvalue
- the entry value
-
-