Interface Matrix
- All Superinterfaces:
AbelianGroup<Matrix>
,DeepCopyable
,MatrixAccess
,MatrixRing
,MatrixTable
,Monoid<Matrix>
,Ring<Matrix>
,Table
- All Known Subinterfaces:
SparseMatrix
- All Known Implementing Classes:
BidiagonalMatrix
,BorderedHessian
,ColumnBindMatrix
,CongruentMatrix
,CorrelationMatrix
,CSCSparseMatrix
,CSRSparseMatrix
,DenseMatrix
,DiagonalMatrix
,DiagonalSum
,DOKSparseMatrix
,FastKroneckerProduct
,GivensMatrix
,GoldfeldQuandtTrotter
,Hessian
,HilbertMatrix
,ImmutableMatrix
,Inverse
,Jacobian
,KroneckerProduct
,LILSparseMatrix
,LowerTriangularMatrix
,MAT
,MatrixRootByDiagonalization
,MatthewsDavies
,OuterProduct
,PermutationMatrix
,PositiveDefiniteMatrixByPositiveDiagonal
,PositiveSemiDefiniteMatrixNonNegativeDiagonal
,Pow
,PseudoInverse
,ReturnsMatrix
,SampleCovariance
,SimilarMatrix
,SubMatrixRef
,SymmetricKronecker
,SymmetricMatrix
,TridiagonalMatrix
,UpperTriangularMatrix
This interface defines a
Matrix
as a Ring
, a Table
,
and a few more methods not already defined in its mathematical definition.
The interface is made minimal to avoid listing all possible matrix
operations. Instead, matrix operations are grouped into packages and classes
by their properties. This is to avoid interface "pollution", lengthy and
cumbersome design.-
Method Summary
Modifier and TypeMethodDescriptiondeepCopy()
The implementation returns an instance created fromthis
by the copy constructor of the class, or justthis
if the instance itself is immutable.getColumn
(int j) Get the specified column in the matrix as a vector.getRow
(int i) Get the specified row in the matrix as a vector.Right multiply this matrix, A, by a vector.scaled
(double c) Scale this matrix, A, by a constant.default String
toCSV()
Methods inherited from interface dev.nm.algebra.linear.matrix.doubles.MatrixAccess
get, set
-
Method Details
-
multiply
Right multiply this matrix, A, by a vector.- Parameters:
v
- a vector- Returns:
- Av, a vector
-
scaled
Scale this matrix, A, by a constant.- Parameters:
c
- a double- Returns:
- cA
-
getRow
Get the specified row in the matrix as a vector.- Parameters:
i
- the row index- Returns:
- the vector A[i, ]
- Throws:
MatrixAccessException
- when i < 1, or when i > the number of rows
-
getColumn
Get the specified column in the matrix as a vector.- Parameters:
j
- the column index- Returns:
- a vector A[, j]
- Throws:
MatrixAccessException
- when j < 1, or when j > the number of columns
-
deepCopy
Matrix deepCopy()Description copied from interface:DeepCopyable
The implementation returns an instance created fromthis
by the copy constructor of the class, or justthis
if the instance itself is immutable.- Specified by:
deepCopy
in interfaceDeepCopyable
- Returns:
- an independent (deep) copy of the instance
-
toCSV
-