Module flag4j
Package org.flag4j.arrays.backend
Interface DenseMatrixMixinOld<T extends DenseMatrixMixinOld<T,U,V,W,Y>,U extends CooMatrixMixin<U,T,?,V,W,Y>,V extends DenseVectorMixin<V,?,T,W,Y>,W,Y>
- Type Parameters:
T
- Type of this dense matrix.U
- Type of sparse COO matrix which is equivalent toT
.V
- Type of vector which is similar to the type of this dense matrix.Y
- Type (or wrapper) of an element of this matrix.
- All Superinterfaces:
DenseTensorMixin<T,
,U> MatrixMixinOld<T,
,T, V, V, W, Y> MatrixVectorOpsMixin<T,
,V, V> TensorBinaryOpsMixin<T,
,T> TensorMixin<T,
W, Y>
- All Known Implementing Classes:
CMatrix
,DenseFieldMatrixBase
,FieldMatrix
,Matrix
public interface DenseMatrixMixinOld<T extends DenseMatrixMixinOld<T,U,V,W,Y>,U extends CooMatrixMixin<U,T,?,V,W,Y>,V extends DenseVectorMixin<V,?,T,W,Y>,W,Y>
extends MatrixMixinOld<T,T,V,V,W,Y>, DenseTensorMixin<T,U>
This interface defines operations that all dense matrices should implement.
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
Checks if a matrix has full rank.default boolean
Checks if a matrix is invertible.boolean
Checks if a matrix is singular.int
Computes the rank of this matrix (i.e.Sets a slice of this matrix to the specifiedvalues
.Sets the value of this matrix using a 2D array.Methods inherited from interface org.flag4j.arrays.backend.DenseTensorMixin
addEq, allClose, allClose, div, divEq, elemMultEq, subEq, toCoo
Methods inherited from interface org.flag4j.arrays.backend.MatrixMixinOld
augment, augment, copy, det, fib, getSlice, getTriL, getTriL, getTriU, getTriU, H, isAntiSymmetric, isCloseToI, isDiag, isHermitian, isI, isOrthogonal, isSquare, isSymmetric, isTri, isTriL, isTriU, isVector, mult, multTranspose, numCols, numRows, removeCol, removeCols, removeRow, removeRows, set, setSliceCopy, stack, stack, swapCols, swapRows, tr, trace, vectorType
Methods inherited from interface org.flag4j.arrays.backend.MatrixVectorOpsMixin
getCol, getCol, getDiag, getRow, getRow, mult, setCol, setRow, toVector
Methods inherited from interface org.flag4j.arrays.backend.TensorMixin
get, getEntries, getRank, getShape, makeLikeTensor, T, T, T
-
Method Details
-
isSingular
boolean isSingular()Checks if a matrix is singular. That is, if the matrix is NOT invertible.- Returns:
- True if this matrix is singular or non-square. Otherwise, returns false.
- See Also:
-
isInvertible
default boolean isInvertible()Checks if a matrix is invertible.- Returns:
- True if this matrix is invertible.
- See Also:
-
setSlice
Sets a slice of this matrix to the specifiedvalues
. TherowStart
andcolStart
parameters specify the upper left index location of the slice to set within this matrix.- Parameters:
values
- New values for the specified slice.rowStart
- Starting row index for the slice (inclusive).colStart
- Starting column index for the slice (inclusive).- Returns:
- A reference to this matrix.
- Throws:
IllegalArgumentException
- IfrowStart
orcolStart
are not within the matrix.IllegalArgumentException
- If thevalues
slice, with upper left corner at the specified location, does not fit completely within this matrix.
-
setValues
Sets the value of this matrix using a 2D array.- Parameters:
values
- New values of the matrix.- Returns:
- A reference to this matrix.
- Throws:
IllegalArgumentException
- If thevalues
array has a different shape then this matrix.
-
matrixRank
int matrixRank()Computes the rank of this matrix (i.e. the number of linearly independent rows/columns in this matrix).
Note that here, rank is NOT the same as a tensor rank (i.e. number of indices needed to specify an entry in the tensor).
- Returns:
- The matrix rank of this matrix.
-
isFullRank
default boolean isFullRank()Checks if a matrix has full rank. That is, if a matrices rank is equal to the number of rows in the matrix.- Returns:
- True if this matrix has full rank. Otherwise, returns false.
-