Uses of Class
org.flag4j.arrays.dense.Matrix
Packages that use Matrix
Package
Description
Provides implementations for dense tensors, matrices, and vectors.
Contains implementations for sparse tensors, matrices, and vectors.
General purpose linear algebra operations including condition number evaluations, eigenvalue/eigenvector computations, matrix
inversion, and subspace analysis.
Provides implementations of matrix balancing for real and complex matrices.
Provides implementations of the Cholesky decomposition for real and complex matrices.
Provides implementations of the Hessenberg decomposition for real and complex matrices.
Provides implementations of the LU decomposition for real, complex, and field matrices.
Provides implementations of the QR decomposition for real and complex matrices.
Provides implementations of the Schur decomposition for real and complex matrices.
Provides implementations of the singular value decomposition for real and complex matrices.
Provides abstract classes useful for implementing real or complex matrix decompositions which proceed by unitary transformations.
General linear algebra operations.
Implementations of operations on real dense array objects.
Implementations of operations between real array objects and
Field dense array
objects.Implementations of operations on real sparse COO (coordinate) array objects.
Contains solvers which solve well determined linear tensor and matrix equations in an exact sense.
Contains solvers which solve well determined triangular linear matrix equations in an exact sense.
Solvers for under-, well-, or over-determined linear systems in a least-squares sense.
Utility classes for computing and applying matrix and vector transformations.
Pseudo-random generation of real/complex numbers, and arrays, vectors, matrices, and tensors.
-
Uses of Matrix in org.flag4j.arrays.backend.field_arrays
Methods in org.flag4j.arrays.backend.field_arrays that return Matrix -
Uses of Matrix in org.flag4j.arrays.backend.smart_visitors
Methods in org.flag4j.arrays.backend.smart_visitors with parameters of type MatrixModifier and TypeMethodDescriptionMatrixMixin<?, ?, ?, ?> MatrixMixin<?, ?, ?, ?> MatrixMixin<?, ?, ?, ?> MatrixMixin<?, ?, ?, ?> abstract TMatrixMixin<?, ?, ?, ?> -
Uses of Matrix in org.flag4j.arrays.dense
Subclasses with type arguments of type Matrix in org.flag4j.arrays.denseModifier and TypeClassDescriptionclassInstances of this class represents a complex dense matrix backed by adouble[]array.Classes in org.flag4j.arrays.dense that implement interfaces with type arguments of type MatrixModifier and TypeClassDescriptionclassInstances of this class represents a complex dense matrix backed by adouble[]array.classInstances of this class represents a complex dense matrix backed by adouble[]array.classA dense vector backed by a primitive double array.classA dense vector backed by a primitive double array.Methods in org.flag4j.arrays.dense that return MatrixModifier and TypeMethodDescriptionRingMatrix.abs()Computes the element-wise absolute value of this tensor.Sums this matrix with a real sparse COO matrix.Sums this matrix with a real sparse CSR matrix.Stacks matrices along rows.Augments a vector to this matrix.static MatrixMatrix.diag(double... data) Constructs a diagonal matrix from an array specifying the diagonal elements of the matrix.static MatrixConstructs a diagonal matrix from a vector specifying the diagonal elements of the matrix.Matrix.flatten()Flattens this matrix to a row vector.Matrix.flatten(int axis) Flattens this matrix along the specified axis.Matrix.getSlice(int rowStart, int rowEnd, int colStart, int colEnd) Gets a specified slice of this matrix.Matrix.getTriL(int diagOffset) Extracts the lower-triangular portion of this matrix with a specified diagonal offset.Matrix.getTriU(int diagOffset) Extracts the upper-triangular portion of this matrix with a specified diagonal offset.Matrix.H()Computes the conjugate transpose of a tensor by exchanging the first and last axes of this tensor and conjugating the exchanged values.static MatrixMatrix.I(int size) Constructs an identity matrix of the specified size.static MatrixMatrix.I(int numRows, int numCols) Constructs an identity-like matrix of the specified shape.static MatrixConstructs an identity-like matrix of the specified shape.Matrix.makeLikeTensor(Shape shape, double[] data) Constructs a tensor of the same type as this tensor with the given the shape and data.Computes the matrix multiplication between two matrices.Computes the matrix multiplication between this matrix and a real sparse COO matrix.Computes the matrix multiplication between this matrix and a real sparse CSR matrix.Matrix.multTranspose(Matrix b) Multiplies this matrix with the transpose of thebtensor as if bythis.mult(b.T()).Computes the outer product of two vectors.Matrix.pow(int n) Computes the matrix multiplication of this matrix with itselfntimes.Matrix.removeCol(int colIndex) Removes a specified column from this matrix.Matrix.removeCols(int... colIndices) Removes a specified set of columns from this matrix.Matrix.removeRow(int rowIndex) Removes a specified row from this matrix.Matrix.removeRows(int... rowIndices) Removes a specified set of rows from this matrix.Vector.repeat(int n, int axis) Repeats a vectorntimes along a certain axis to create a matrix.Sets an index of this matrix to the specified value.Matrix.setCol(double[] values, int colIndex) Sets a column of this matrix at the given index to the specified values.Sets a column of this matrix at the given index to the specified values.Sets a column of this matrix at the given index to the specified values.Matrix.setRow(double[] values, int rowIndex) Sets a row of this matrix at the given index to the specified values.Sets a row of this matrix at the given index to the specified values.Sets a row of this matrix at the given index to the specified values.Matrix.setSlice(double[][] values, int rowStart, int colStart) Sets a slice of this matrix to the specifiedvalues.Sets a slice of this matrix to the specifiedvalues.Sets a slice of this matrix to the specifiedvalues.Matrix.setSliceCopy(Matrix values, int rowStart, int colStart) Creates a copy of this matrix and sets a slice of the copy to the specified values.Matrix.setValues(double[][] values) Sets the value of this matrix using a 2D array.Matrix.setValues(int[][] values) Sets the value of this matrix using a 2D array.Sets the value of this matrix using a 2D array.Sets the value of this matrix using a 2D array.Sets the value of this matrix using another matrix.Stacks matrices along columns.Stacks two vectors vertically as if they were row vectors to form a matrix with two rows.Stacks two vectors along specified axis.Computes the difference of this matrix with a real sparse COO matrix.Computes the difference of this matrix with a real sparse CSR matrix.Matrix.swapCols(int colIndex1, int colIndex2) Swaps specified columns in the matrix.Matrix.swapRows(int rowIndex1, int rowIndex2) Swaps specified rows in the matrix.Matrix.T()Computes the transpose of a tensor by exchanging the first and last axes of this tensor.Matrix.T(int... axes) Computes the transpose of this tensor.Matrix.T(int axis1, int axis2) Computes the transpose of a tensor by exchangingaxis1andaxis2.Tensor.toMatrix()Converts this tensor to an equivalent matrix.Converts this tensor to an equivalent matrix with the specified shape.Vector.toMatrix(boolean columVector) Converts a vector to an equivalent matrix representing either a row or column vector.CMatrix.toReal()Converts this complex matrix to a real matrix.Methods in org.flag4j.arrays.dense with parameters of type MatrixModifier and TypeMethodDescriptionComputes the element-wise sum between two tensors of the same shape.Stacks matrices along rows.Computes the element-wise quotient between two tensors.Computes the element-wise multiplication of two tensors of the same shape.Computes the Frobenius inner product of two matrices.Computes the matrix multiplication between two matrices.Computes the matrix multiplication between two matrices.Matrix.multTranspose(Matrix b) Multiplies this matrix with the transpose of thebtensor as if bythis.mult(b.T()).Sets a slice of this matrix to the specifiedvalues.Matrix.setSliceCopy(Matrix values, int rowStart, int colStart) Creates a copy of this matrix and sets a slice of the copy to the specified values.Sets the value of this matrix using another matrix.Stacks matrices along columns.Computes the element-wise difference between two tensors of the same shape.Constructors in org.flag4j.arrays.dense with parameters of type Matrix -
Uses of Matrix in org.flag4j.arrays.sparse
Classes in org.flag4j.arrays.sparse that implement interfaces with type arguments of type MatrixModifier and TypeClassDescriptionclassA real sparse matrix stored in coordinate list (COO) format.classA real sparse vector stored in coordinate list (COO) format.classInstances of this class represent a real sparse matrix using the compressed sparse row (CSR) format.Methods in org.flag4j.arrays.sparse that return MatrixModifier and TypeMethodDescriptionLeft multiplies this permutation matrix to the specified matrix.Computes the matrix multiplication between two matrices.Multiplies this sparse CSR matrix with a real dense matrix.Computes the matrix multiplication between two matrices.CooMatrix.multTranspose(CooMatrix b) Multiplies this matrix with the transpose of thebtensor as if bythis.mult(b.T()).CsrMatrix.multTranspose(CsrMatrix b) Multiplies this matrix with the transpose of thebtensor as if bythis.mult(b.T()).Computes the outer product of two vectors.Right multiplies this permutation matrix to the specified matrix.Computes the tensor contraction of this tensor with a specified tensor over the specified set of axes.Computes the tensor contraction of this tensor with a specified tensor over the specified set of axes.CooMatrix.toDense()Converts this sparse tensor to an equivalent dense tensor.CsrMatrix.toDense()Converts this sparse CSR matrix to an equivalent dense matrix.PermutationMatrix.toDense()Converts this permutation matrix to areal dense matrix.SymmTriDiag.toDense()Converts this symmetric tri-diagonal matrix to an equivalent dense matrix.Methods in org.flag4j.arrays.sparse with parameters of type MatrixModifier and TypeMethodDescriptionComputes the element-wise multiplication between two matrices of the same shape.Computes the element-wise product between two matrices.Left multiplies this permutation matrix to the specified matrix.Computes the matrix multiplication between two matrices.Multiplies this sparse CSR matrix with a real dense matrix.Right multiplies this permutation matrix to the specified matrix. -
Uses of Matrix in org.flag4j.linalg
Methods in org.flag4j.linalg that return MatrixModifier and TypeMethodDescriptionstatic MatrixComputes the direct sum of two matrices.static MatrixComputes the direct sum of two matrices.static MatrixComputes the extended reduced row echelon form of a matrix.static MatrixSubSpace.getColSpace(Matrix src) Computes an orthonormal basis of the column space of a specified matrix.static MatrixEigen.getEigenVectorsTriu(Matrix T) Computes the eigenvectors of an upper triangular matrix.static MatrixSubSpace.getLeftNullSpace(Matrix src) Computes an orthonormal basis of the left null space of a specified matrix.static MatrixSubSpace.getNullSpace(Matrix src) Computes an orthonormal basis of the null space of a specified matrix.static MatrixSubSpace.getRowSpace(Matrix src) Computes an orthonormal basis of the row space of a specified matrix.static MatrixComputes the inverse of this matrix.static MatrixInverts a diagonal matrix.static MatrixDirectSum.invDirectSum(Matrix A, Matrix B) Computes direct sum from bottom left to top right of two matrices.static MatrixDirectSum.invDirectSum(Matrix A, CooMatrix B) Computes direct sum from bottom left to top right of two matrices.static MatrixInvert.invSymPosDef(Matrix src) Inverts a symmetric positive-definite matrix.static MatrixInvert.invSymPosDef(Matrix src, boolean checkPosDef) Inverts a symmetric positive-definite matrix.static MatrixInverts a lower triangular matrix.static MatrixInverts an upper triangular matrix.static MatrixComputes the pseudo-inverse of this matrix.static MatrixComputes a row echelon form of a Matrix.static MatrixComputes the reduced row echelon form of a matrix.Methods in org.flag4j.linalg with parameters of type MatrixModifier and TypeMethodDescriptionstatic doubleComputes the condition number of a matrix.static doubleCondition.condEntryWise(Matrix src, double p) Computes the condition number of a matrix using anentry-wise norm.static doubleComputes the condition number of a matrix using the Frobenius norm.static doubleCondition.condSchatten(Matrix src, double p) Computes the condition number of a matrix using theSchatten norm.static CMatrixComputes the direct sum of two matrices.static CMatrixComputes the direct sum of two matrices.static MatrixComputes the direct sum of two matrices.static CMatrixDirectSum.directSum(Matrix A, CooCMatrix B) Computes the direct sum of two matrices.static MatrixComputes the direct sum of two matrices.static CooCMatrixDirectSum.directSum(CooCMatrix A, Matrix B) Computes the direct sum of two matrices.static CooMatrixComputes the direct sum of two matrices.static doubleMatrixNorms.entryWiseNorm(Matrix src, double p) Computes the entry-wise p-norm of a real dense matrix.static MatrixComputes the extended reduced row echelon form of a matrix.static CVectorEigen.get2x2EigenValues(Matrix src) Computes the eigenvalues of a 2×2 matrix explicitly.static MatrixSubSpace.getColSpace(Matrix src) Computes an orthonormal basis of the column space of a specified matrix.static CMatrix[]Eigen.getEigenPairs(Matrix src) Computes the eigenvalues and eigenvectors of a square complex matrix.static CMatrix[]Eigen.getEigenPairs(Matrix src, long seed) Computes the eigenvalues and eigenvectors of a square real matrix.static CVectorEigen.getEigenValues(Matrix src) Computes the eigenvalues of a square real dense matrix.static CVectorEigen.getEigenValues(Matrix src, long seed) Computes the eigenvalues of a square real dense matrix.static CVectorEigen.getEigenValues(Matrix src, long seed, int maxIterationFactor) Computes the eigenvalues of a square real dense matrix.static CMatrixEigen.getEigenVectors(Matrix src) Computes the eigenvectors of a square real dense matrix.static CMatrixEigen.getEigenVectors(Matrix src, long seed) Computes the eigenvectors of a square real dense matrix.static CMatrixEigen.getEigenVectors(Matrix src, long seed, int maxIterationFactor) Computes the eigenvectors of a square real dense matrix.static MatrixEigen.getEigenVectorsTriu(Matrix T) Computes the eigenvectors of an upper triangular matrix.static MatrixSubSpace.getLeftNullSpace(Matrix src) Computes an orthonormal basis of the left null space of a specified matrix.static MatrixSubSpace.getNullSpace(Matrix src) Computes an orthonormal basis of the null space of a specified matrix.static MatrixSubSpace.getRowSpace(Matrix src) Computes an orthonormal basis of the row space of a specified matrix.static booleanSubSpace.hasEqualSpan(Matrix src1, Matrix src2) Checks if two sets of vectors, stored as the columns of matrices, span the same space.static doubleMatrixNorms.inducedNorm(Matrix src, double p) Computes the matrix operator norm of a real dense matrix "induced" by the vector p-norm.static doubleComputes the infinite norm of this matrix.static MatrixComputes the inverse of this matrix.static MatrixInverts a diagonal matrix.static CMatrixDirectSum.invDirectSum(CMatrix A, Matrix B) Computes direct sum from bottom left to top right of two matrices.static CMatrixDirectSum.invDirectSum(Matrix A, CMatrix B) Computes direct sum from bottom left to top right of two matrices.static MatrixDirectSum.invDirectSum(Matrix A, Matrix B) Computes direct sum from bottom left to top right of two matrices.static CMatrixDirectSum.invDirectSum(Matrix A, CooCMatrix B) Computes direct sum from bottom left to top right of two matrices.static MatrixDirectSum.invDirectSum(Matrix A, CooMatrix B) Computes direct sum from bottom left to top right of two matrices.static CooCMatrixDirectSum.invDirectSum(CooCMatrix A, Matrix B) Computes direct sum from bottom left to top right of two matrices.static CooMatrixDirectSum.invDirectSum(CooMatrix A, Matrix B) Computes direct sum from bottom left to top right of two matrices.static MatrixInvert.invSymPosDef(Matrix src) Inverts a symmetric positive-definite matrix.static MatrixInvert.invSymPosDef(Matrix src, boolean checkPosDef) Inverts a symmetric positive-definite matrix.static MatrixInverts a lower triangular matrix.static MatrixInverts an upper triangular matrix.static booleanChecks if matrices are inverses of each other.static booleanChecks if the matrix is positive-definite.static booleanPositiveDefiniteness.isPosSemiDef(Matrix src) Checks if the matrix is positive semi-definite.static booleanPositiveDefiniteness.isSymmPosDef(Matrix src) Checks if the matrix is symmetric positive-definite.static doubleComputes the maximum norm of this matrix.static doubleComputes the Frobenius (or \( L_{2, 2} \)) norm of a real dense matrix.static doubleComputes the \( L_{p,q} \) norm of a real dense matrix.static MatrixComputes the pseudo-inverse of this matrix.static MatrixComputes a row echelon form of a Matrix.static MatrixComputes the reduced row echelon form of a matrix.static doubleMatrixNorms.schattenNorm(Matrix src, double p) Computes the Schatten p-norm of a real dense matrix. -
Uses of Matrix in org.flag4j.linalg.decompositions.balance
Subclasses with type arguments of type Matrix in org.flag4j.linalg.decompositions.balanceModifier and TypeClassDescriptionclassInstances of this class may be used to balance real dense matrices.Methods in org.flag4j.linalg.decompositions.balance that return MatrixModifier and TypeMethodDescriptionRealBalancer.applyLeftTransform(Matrix src) Efficiently left multiplies \( PD \) to the providedsrcmatrix.RealBalancer.applyRightTransform(Matrix src) Efficiently right multiplies \( D^{-1}P^{-1} \) to the providedsrcmatrix.Balancer.getD()Gets the diagonal scaling factors for the last matrix balanced by this balancer.Balancer.getD(boolean full) Gets the diagonal scaling matrix for the last matrix balanced by this balancer.Balancer.getDInv()Gets the inverse of the full diagonal scaling matrix D-1 from the balancing problem.Balancer.getT()Get the combined permutation and diagonal scaling matrix, T=PD, from the last matrix balanced.Balancer.getTInv()Get the inverse of combined permutation and diagonal scaling matrix, T-1=D-1P-1, from the last matrix balanced.Methods in org.flag4j.linalg.decompositions.balance with parameters of type MatrixModifier and TypeMethodDescriptionRealBalancer.applyLeftTransform(Matrix src) Efficiently left multiplies \( PD \) to the providedsrcmatrix.RealBalancer.applyRightTransform(Matrix src) Efficiently right multiplies \( D^{-1}P^{-1} \) to the providedsrcmatrix. -
Uses of Matrix in org.flag4j.linalg.decompositions.chol
Subclasses with type arguments of type Matrix in org.flag4j.linalg.decompositions.cholModifier and TypeClassDescriptionclassAn abstract base class for Cholesky decomposition of symmetric (or symmetric) positive-definite matrices.Methods in org.flag4j.linalg.decompositions.chol with parameters of type MatrixModifier and TypeMethodDescriptionDecompose a matrix into \( A=LL^{T} \) where L is a lower triangular matrix and \( L^{T} \) is the transpose of L. -
Uses of Matrix in org.flag4j.linalg.decompositions.hess
Methods in org.flag4j.linalg.decompositions.hess that return MatrixModifier and TypeMethodDescriptionRealHess.getH()Gets the upper Hessenburg matrix, \( H \), from the Hessenburg decomposition.SymmHess.getH()Gets the Hessenberg matrix, \( H \), from the decomposition.RealHess.getUpper()Gets the upper Hessenburg matrix, \( H \), from the last decomposition.protected MatrixRealHess.initQ()Creates and initializes \( Q \) to the appropriately sized identity matrix.Methods in org.flag4j.linalg.decompositions.hess with parameters of type MatrixModifier and TypeMethodDescriptionComputes the Hessenberg decomposition of the specified matrix.Applies decomposition to the source matrix.Applies decomposition to the source matrix.protected voidPerforms basic setup for the decomposition. -
Uses of Matrix in org.flag4j.linalg.decompositions.lu
Subclasses with type arguments of type Matrix in org.flag4j.linalg.decompositions.luModifier and TypeClassDescriptionclassInstances of this class can be used to compute the LU decomposition of a real dense matrix.Methods in org.flag4j.linalg.decompositions.lu that return Matrix -
Uses of Matrix in org.flag4j.linalg.decompositions.qr
Methods in org.flag4j.linalg.decompositions.qr that return MatrixModifier and TypeMethodDescriptionRealQR.getR()Gets the upper triangular matrix, \( R \), from the QR decomposition.RealQR.getUpper()Gets the upper triangular matrix, \( R \), from the last decomposition.protected MatrixRealQR.initQ()Creates and initializes the \( Q \) matrix to the appropriately sized identity matrix.Methods in org.flag4j.linalg.decompositions.qr with parameters of type Matrix -
Uses of Matrix in org.flag4j.linalg.decompositions.schur
Subclasses with type arguments of type Matrix in org.flag4j.linalg.decompositions.schurModifier and TypeClassDescriptionclassInstanced of this class can be used for computing the Schur decomposition of a real dense square matrix.Methods in org.flag4j.linalg.decompositions.schur with parameters of type MatrixModifier and TypeMethodDescriptionprotected voidRealSchur.checkFinite(Matrix src) Ensures thatsrconly contains finite values.Computes the Schur decomposition of the input matrix. -
Uses of Matrix in org.flag4j.linalg.decompositions.svd
Subclasses with type arguments of type Matrix in org.flag4j.linalg.decompositions.svdModifier and TypeClassDescriptionclassInstances of this class can be used to compute the singular value decomposition (SVD) of areal dense matrix.Fields in org.flag4j.linalg.decompositions.svd declared as MatrixModifier and TypeFieldDescriptionprotected MatrixSVD.SThe rectangular diagonal \( \Sigma \) corresponding to \( M=U\Sigma V^{H} \) in the SVD.Methods in org.flag4j.linalg.decompositions.svd that return MatrixModifier and TypeMethodDescriptionSVD.getS()Gets the diagonal matrix \( \Sigma \) corresponding to \( M=U\Sigma V^{H} \) in the SVD.protected MatrixRealSVD.invDirectSum(Matrix src) Computes the inverse direct sum of a matrix and its Hermitian transpose.protected MatrixRealSVD.makeEigenPairs(Matrix B, double[] eigVals) Gets the eigen values and vectors of symmetric the block matrix which corresponds to the singular values and vectors of the matrix being decomposed.Methods in org.flag4j.linalg.decompositions.svd with parameters of type MatrixModifier and TypeMethodDescriptionprotected voidRealSVD.extractNormalizedCols(Matrix singularVecs, int j) Extracts the singular vectors, normalizes them and sets the columns of \( U \) and \( V \) to be the left/right singular vectors.protected MatrixRealSVD.invDirectSum(Matrix src) Computes the inverse direct sum of a matrix and its Hermitian transpose.protected MatrixRealSVD.makeEigenPairs(Matrix B, double[] eigVals) Gets the eigen values and vectors of symmetric the block matrix which corresponds to the singular values and vectors of the matrix being decomposed.protected voidRealSVD.makeEigenVals(Matrix B, double[] eigVals) Gets the eigen values of the symmetric block matrix which corresponds to the singular values of the matrix being decomposed. -
Uses of Matrix in org.flag4j.linalg.decompositions.unitary
Subclasses with type arguments of type Matrix in org.flag4j.linalg.decompositions.unitaryModifier and TypeClassDescriptionclassThe base class for real matrix decompositions which proceed by using orthogonal transformations (specifically Householder reflectors) to bring a matrix into an upper triangular/Hessenburg matrix.Methods in org.flag4j.linalg.decompositions.unitary that return MatrixModifier and TypeMethodDescriptionRealUnitaryDecomposition.getQ()Gets the unitaryQmatrix from the unitary decomposition.protected MatrixGets the upper triangular/Hessenburg matrix from the last decomposition.Methods in org.flag4j.linalg.decompositions.unitary with parameters of type Matrix -
Uses of Matrix in org.flag4j.linalg.ops
Methods in org.flag4j.linalg.ops that return MatrixModifier and TypeMethodDescriptionstatic MatrixDispatches a matrix transpose problem to the appropriate algorithm based on its shape and size.Methods in org.flag4j.linalg.ops with parameters of type MatrixModifier and TypeMethodDescriptionstatic Complex128[]Dispatches a matrix multiplication problem to the appropriate algorithm based on the size.static Complex128[]Dispatches a matrix multiplication problem to the appropriate algorithm based on the size.static Complex128[]Dynamically chooses the appropriate matrix-vector multiplication algorithm based on the shapes of the matrix and vector.static double[]Dispatches a matrix multiply problem to the appropriate algorithm based on the size of the matrices.static MatrixDispatches a matrix transpose problem to the appropriate algorithm based on its shape and size.static double[]RealDenseMatrixMultiplyDispatcher.dispatchTranspose(Matrix A, Matrix B) Dispatches a matrix multiply-transpose problem equivalent to A.mult(B.T()) to the appropriate algorithm based on the size of the matrices. -
Uses of Matrix in org.flag4j.linalg.ops.dense_sparse.coo.real
Methods in org.flag4j.linalg.ops.dense_sparse.coo.real that return MatrixModifier and TypeMethodDescriptionstatic MatrixAdds a real dense matrix to a real sparse matrix.static MatrixRealDenseSparseMatrixOps.addToEachCol(CooMatrix src, Vector col) Adds a dense vector to each column as if the vector is a column vector.static MatrixRealDenseSparseMatrixOps.addToEachRow(CooMatrix src, Vector row) Adds a dense vector to add to each row as if the vector is a row vector.static MatrixSubtracts a real sparse matrix from a real dense matrix.static MatrixSubtracts a real dense matrix from a real sparse matrix.Methods in org.flag4j.linalg.ops.dense_sparse.coo.real with parameters of type MatrixModifier and TypeMethodDescriptionstatic MatrixAdds a real dense matrix to a real sparse matrix.static voidAdds a real dense matrix to a real sparse matrix and stores the result in the first matrix.static CooMatrixComputes the element-wise division between a real sparse matrix and a real dense matrix.static CooMatrixComputes the element-wise multiplication between a real dense matrix and a real sparse matrix.static booleanRealDenseSparseEquals.matrixEquals(Matrix A, CooMatrix B) Checks if a real dense matrix is equal to a real sparse matrix.static MatrixSubtracts a real sparse matrix from a real dense matrix.static MatrixSubtracts a real dense matrix from a real sparse matrix.static voidSubtracts a real sparse matrix from a real dense matrix and stores the result in the first matrix. -
Uses of Matrix in org.flag4j.linalg.ops.dense_sparse.coo.real_complex
Methods in org.flag4j.linalg.ops.dense_sparse.coo.real_complex with parameters of type MatrixModifier and TypeMethodDescriptionstatic CMatrixRealComplexDenseCooMatOps.add(Matrix src1, CooCMatrix src2) Adds a real dense matrix to a complex sparse matrix.static CooCMatrixRealComplexDenseCooMatOps.elemMult(Matrix src1, CooCMatrix src2) Computes the element-wise multiplication between a complex dense matrix and a real sparse matrix.static booleanRealComplexDenseSparseEquals.matrixEquals(Matrix A, CooCMatrix B) Checks if a real dense matrix is equal to a sparse complex matrix.static CMatrixRealComplexDenseCooMatOps.sub(Matrix src1, CooCMatrix src2) Subtracts a real sparse matrix from a real dense matrix.static CMatrixRealComplexDenseCooMatOps.sub(CooCMatrix src2, Matrix src1) Subtracts a real sparse matrix from a real dense matrix. -
Uses of Matrix in org.flag4j.linalg.ops.dense_sparse.coo.real_field_ops
Methods in org.flag4j.linalg.ops.dense_sparse.coo.real_field_ops with parameters of type MatrixModifier and TypeMethodDescriptionstatic <T extends Field<T>>
AbstractCooFieldMatrix<?, ?, ?, T> RealFieldDenseCooMatrixOps.elemDiv(AbstractCooFieldMatrix<?, ?, ?, T> src1, Matrix src2) Computes the element-wise division between a complex sparse matrix and a real dense matrix.static <T extends Field<T>>
AbstractCooFieldMatrix<?, ?, ?, T> RealFieldDenseCooMatrixOps.elemMult(Matrix src1, AbstractCooFieldMatrix<?, ?, ?, T> src2) Computes the element-wise multiplication between a real dense matrix and a complex sparse matrix. -
Uses of Matrix in org.flag4j.linalg.ops.dense_sparse.csr.real
Methods in org.flag4j.linalg.ops.dense_sparse.csr.real that return MatrixModifier and TypeMethodDescriptionstatic MatrixComputes the element-wise sum of two matrices.static MatrixRealCsrDenseOps.applyBinOpp(Matrix src1, CsrMatrix src2, BinaryOperator<Double> opp) Applies the specified binary operator element-wise to the two matrices.static MatrixRealCsrDenseOps.applyBinOpp(CsrMatrix src1, double b, BinaryOperator<Double> opp, UnaryOperator<Double> uOpp) Applies the specified binary operator element-wise to a matrix and a scalar.static MatrixRealCsrDenseOps.applyBinOpp(CsrMatrix src1, Matrix src2, BinaryOperator<Double> opp, UnaryOperator<Double> uOpp) Applies the specified binary operator element-wise to the two matrices.static MatrixComputes the matrix multiplication between a real dense matrix and a real sparse CSR matrix.static MatrixComputes the matrix multiplication between a real sparse CSR matrix and a real dense matrix.static MatrixRealCsrDenseMatMult.standardTranspose(CsrMatrix src1, Matrix src2) Computes the matrix multiplication between a real sparse CSR matrix and the transpose of a real dense matrix.static MatrixComputes the element-wise difference of two matrices.Methods in org.flag4j.linalg.ops.dense_sparse.csr.real with parameters of type MatrixModifier and TypeMethodDescriptionstatic MatrixComputes the element-wise sum of two matrices.static MatrixRealCsrDenseOps.applyBinOpp(Matrix src1, CsrMatrix src2, BinaryOperator<Double> opp) Applies the specified binary operator element-wise to the two matrices.static MatrixRealCsrDenseOps.applyBinOpp(CsrMatrix src1, Matrix src2, BinaryOperator<Double> opp, UnaryOperator<Double> uOpp) Applies the specified binary operator element-wise to the two matrices.static CsrMatrixRealCsrDenseOps.applyBinOppToSparse(Matrix src1, CsrMatrix src2, BinaryOperator<Double> opp) Applies an element-wise binary operation to a real dense and real sparse CSR matrix under the assumption thatopp.apply(x, 0d) = 0dandopp.apply(0d, x) = 0d.static MatrixComputes the matrix multiplication between a real dense matrix and a real sparse CSR matrix.static MatrixComputes the matrix multiplication between a real sparse CSR matrix and a real dense matrix.static MatrixRealCsrDenseMatMult.standardTranspose(CsrMatrix src1, Matrix src2) Computes the matrix multiplication between a real sparse CSR matrix and the transpose of a real dense matrix.static MatrixComputes the element-wise difference of two matrices. -
Uses of Matrix in org.flag4j.linalg.ops.dense_sparse.csr.real_complex
Methods in org.flag4j.linalg.ops.dense_sparse.csr.real_complex with parameters of type MatrixModifier and TypeMethodDescriptionstatic CMatrixRealComplexCsrDenseOps.add(CsrCMatrix a, Matrix b) Computes the element-wise sum of two matrices.static CMatrixRealComplexCsrDenseOps.applyBinOpp(Matrix src1, CsrCMatrix src2, BiFunction<Double, Complex128, Complex128> opp) Applies the specified binary operator element-wise to the two matrices.static CMatrixRealComplexCsrDenseOps.applyBinOpp(CsrCMatrix src1, Matrix src2, BiFunction<Complex128, Double, Complex128> opp, UnaryOperator<Double> uOpp) Applies the specified binary operator element-wise to the two matrices.static CMatrixRealComplexCsrDenseOps.sub(Matrix a, CsrCMatrix b) Computes the element-wise difference of two matrices.static CMatrixRealComplexCsrDenseOps.sub(CsrCMatrix a, Matrix b) Computes the element-wise difference of two matrices. -
Uses of Matrix in org.flag4j.linalg.ops.dense_sparse.csr.real_field_ops
Methods in org.flag4j.linalg.ops.dense_sparse.csr.real_field_ops with parameters of type MatrixModifier and TypeMethodDescriptionstatic <T extends Field<T>>
AbstractCsrFieldMatrix<?, ?, ?, T> RealFieldDenseCsrOps.applyBinOppToSparse(Matrix src1, AbstractCsrFieldMatrix<?, ?, ?, T> src2, BiFunction<Double, T, T> opp) Applies an element-wise binary operation to a real dense and real sparse CSR matrix under the assumption thatopp.apply(x, 0d) = 0dandopp.apply(0d, x) = 0d.static <T extends Field<T>>
AbstractDenseFieldMatrix<?, ?, T> RealFieldDenseCsrMatMult.standard(AbstractCsrFieldMatrix<?, ?, ?, T> src1, Matrix src2) Computes the matrix multiplication between a complex sparse CSR matrix and a real dense matrix.static <T extends Field<T>>
AbstractDenseFieldMatrix<?, ?, T> RealFieldDenseCsrMatMult.standard(Matrix src1, AbstractCsrFieldMatrix<?, ?, ?, T> src2) Computes the matrix multiplication between a real dense matrix and a real sparse CSR matrix. -
Uses of Matrix in org.flag4j.linalg.ops.dense.real
Methods in org.flag4j.linalg.ops.dense.real that return MatrixModifier and TypeMethodDescriptionstatic MatrixRealDenseVectorOps.dispatchOuter(Vector src1, Vector src2) Dispatches an outer product problem to an appropriate implementation based on the size of the vectors involved.Methods in org.flag4j.linalg.ops.dense.real with parameters of type MatrixModifier and TypeMethodDescriptionstatic doubleComputes the determinant of a square matrix using the LU factorization.static doubleExplicitly computes the determinant of a 1x1 matrix.static doubleExplicitly computes the determinant of a 2×2 matrix.static doubleExplicitly computes the determinant of a 3x3 matrix.static doubleComputes the determinant of a square matrix using the LU factorization.static doubleComputes the determinant for a triangular matrix.static booleanRealDenseProperties.isCloseToIdentity(Matrix src) Checks if a matrix is the identity matrix approximately.static booleanRealDenseProperties.isIdentity(Matrix src) Checks if a matrix is the identity matrix exactly.static booleanRealDenseEquals.matrixEquals(Matrix A, Matrix B) Checks if two real dense matrices are equal. -
Uses of Matrix in org.flag4j.linalg.ops.dense.real_field_ops
Methods in org.flag4j.linalg.ops.dense.real_field_ops with parameters of type MatrixModifier and TypeMethodDescriptionstatic <T extends Field<T>>
booleanRealFieldDenseEquals.matrixEquals(Matrix A, AbstractDenseFieldMatrix<?, ?, T> B) Checks if two real dense matrices are equal. -
Uses of Matrix in org.flag4j.linalg.ops.dispatch
Subclasses with type arguments of type Matrix in org.flag4j.linalg.ops.dispatchModifier and TypeClassDescriptionfinal classA dispatcher that selects the most suitable matrix multiplication kernel for two real dense matrices.final classA dispatcher that selects the most suitable matrix multiplication kernel for two real dense matrices.final classA dispatcher that selects the most suitable matrix multiplication kernel for two real dense matrices.final classA dispatcher that selects the most suitable matrix-vector multiplication kernel for a real dense matrix/vector pair.Methods in org.flag4j.linalg.ops.dispatch that return MatrixModifier and TypeMethodDescriptionstatic MatrixDispatches the multiplication of two matrices to an appropriate implementation based on the shapes of the two matrices.Methods in org.flag4j.linalg.ops.dispatch that return types with arguments of type MatrixModifier and TypeMethodDescriptionprotected BiFunction<Matrix, Matrix, Matrix> Computes the appropriate function to use when computing the matrix multiplication between two matrices.protected BiFunction<Matrix, Matrix, Matrix> Computes the appropriate function to use when computing the matrix multiplication between two matrices.protected BiFunction<Matrix, Matrix, Matrix> Computes the appropriate function to use when computing the matrix multiplication between two matrices.protected BiFunction<Matrix, Vector, Vector> Computes the appropriate function to use when computing the matrix multiplication between two matrices.Methods in org.flag4j.linalg.ops.dispatch with parameters of type MatrixModifier and TypeMethodDescriptionstatic MatrixDispatches the multiplication of two matrices to an appropriate implementation based on the shapes of the two matrices.static VectorDispatches the multiplication of two matrices to an appropriate implementation based on the shapes of the two matrices. -
Uses of Matrix in org.flag4j.linalg.ops.sparse.coo.real
Methods in org.flag4j.linalg.ops.sparse.coo.real that return MatrixModifier and TypeMethodDescriptionstatic MatrixAdds a double all data (including zero values) of a real sparse matrix.static MatrixRealSparseMatrixOps.addToEachCol(CooMatrix src, CooVector col) Adds a sparse vector to each column of a sparse matrix as if the vector is a column vector.static MatrixRealSparseMatrixOps.addToEachRow(CooMatrix src, CooVector row) Adds a sparse vector to each row of a sparse matrix as if the vector is a row vector.static MatrixRealCooVectorOps.outerProduct(CooVector src1, CooVector src2) Computes the vector outer product between two real sparse vectors.static MatrixSubtracts a double from all data (including zero values) of a real sparse matrix.Methods in org.flag4j.linalg.ops.sparse.coo.real with parameters of type Matrix -
Uses of Matrix in org.flag4j.linalg.ops.sparse.csr.real
Methods in org.flag4j.linalg.ops.sparse.csr.real that return Matrix -
Uses of Matrix in org.flag4j.linalg.solvers.exact
Subclasses with type arguments of type Matrix in org.flag4j.linalg.solvers.exactModifier and TypeClassDescriptionclassSolves a well determined system of equations \( Ax = b \) or \( AX = B \) in an exact sense by using aLU decompositionwhere \( A \), \( B \), and \( X \) are matrices, and \( x \) and \( b \) are vectors.classSolver for solving a real well determined linear tensor equation \( AX = B \) in an exact sense.Methods in org.flag4j.linalg.solvers.exact that return MatrixModifier and TypeMethodDescriptionprotected MatrixRealExactTensorSolver.initMatrix(Tensor A, int prod) Initializes matrix for equivalent linear matrix equation.protected MatrixRealExactSolver.permuteRows(Matrix B) Permute the rows of a matrix using the row permutation matrix from the LU decomposition.Methods in org.flag4j.linalg.solvers.exact with parameters of type MatrixModifier and TypeMethodDescriptionprotected MatrixRealExactSolver.permuteRows(Matrix B) Permute the rows of a matrix using the row permutation matrix from the LU decomposition. -
Uses of Matrix in org.flag4j.linalg.solvers.exact.triangular
Subclasses with type arguments of type Matrix in org.flag4j.linalg.solvers.exact.triangularModifier and TypeClassDescriptionclassThis solver solves linear systems of the form \( Ux = b \) or \( UX = B \) where \( U \) is an upper triangular matrix.classThis solver solves a real linear system of equations where the coefficient matrix is lower triangular.Methods in org.flag4j.linalg.solvers.exact.triangular that return MatrixModifier and TypeMethodDescriptionSolves the linear system of equations given by \( UX = B \) where the coefficient matrix \( U \) is anupper triangularmatrix.Performs forward substitution for a unit lower triangular matrix \( L \) and a matrix \( B \).RealForwardSolver.solve(Matrix L, PermutationMatrix P) Solves a linear system \( LX = P \) for \( X \) where \( L \) is a lower triangular matrix and \( P \) is a permutation matrix.RealBackSolver.solveIdentity(Matrix U) Solves the linear system of equations given by \( UX = I \) where the coefficient matrix \( U \) is anupper triangularmatrix and I is theidentitymatrix of appropriate size.RealForwardSolver.solveIdentity(Matrix L) Performs forward substitution for a unit lower triangular matrix \( L \) and the identity matrix.RealBackSolver.solveLower(Matrix U, Matrix L) Solves a special case of the linear system \( UX = L \) for \( X \) where the coefficient matrix \( U \) is anupper triangularmatrix and the constant matrix \( L \) islower triangular.Methods in org.flag4j.linalg.solvers.exact.triangular with parameters of type MatrixModifier and TypeMethodDescriptionSolves the linear system of equations given by \( UX = B \) where the coefficient matrix \( U \) is anupper triangularmatrix.Solves the linear system of equations given by \( Ux = b \) where the coefficient matrix \( U \) is anupper triangularmatrix.Performs forward substitution for a unit lower triangular matrix \( L \) and a matrix \( B \).Performs forward substitution for a unit lower triangular matrix \( L \) and a vector \( b \).RealForwardSolver.solve(Matrix L, PermutationMatrix P) Solves a linear system \( LX = P \) for \( X \) where \( L \) is a lower triangular matrix and \( P \) is a permutation matrix.RealBackSolver.solveIdentity(Matrix U) Solves the linear system of equations given by \( UX = I \) where the coefficient matrix \( U \) is anupper triangularmatrix and I is theidentitymatrix of appropriate size.RealForwardSolver.solveIdentity(Matrix L) Performs forward substitution for a unit lower triangular matrix \( L \) and the identity matrix.RealBackSolver.solveLower(Matrix U, Matrix L) Solves a special case of the linear system \( UX = L \) for \( X \) where the coefficient matrix \( U \) is anupper triangularmatrix and the constant matrix \( L \) islower triangular. -
Uses of Matrix in org.flag4j.linalg.solvers.lstsq
Subclasses with type arguments of type Matrix in org.flag4j.linalg.solvers.lstsqModifier and TypeClassDescriptionclassInstances of this class solve real linear systems of the form \( Ax = b \) or \( AX = B \) in a least-squares sense. -
Uses of Matrix in org.flag4j.linalg.transformations
Methods in org.flag4j.linalg.transformations that return MatrixModifier and TypeMethodDescriptionstatic MatrixGivens.get2x2Rotator(double v0, double v1) Constructs a Givens rotator \( G \) of size 2 such that for a vector \( \mathbf{v} = \begin{bmatrix}a & b\end{bmatrix} \) we have \( G\mathbf{v} = \begin{bmatrix}r & 0\end{bmatrix} \).static MatrixGivens.get2x2Rotator(Vector v) Constructs a Givens rotator \( G \) of size 2 such that for a vector \( \mathbf{v} = \begin{bmatrix}a & b\end{bmatrix} \) we have \( G\mathbf{v} = \begin{bmatrix}r & 0\end{bmatrix} \).static MatrixGivens.getGeneralRotator(int size, int i, int j, double theta) Constructs a general Givens rotation matrix.static MatrixProjection.getOrthogonal(double xMax, double yMax, double nearClip, double farClip) Creates a \( 4\times4 \) orthogonal projection matrix to project a 3D point in homogeneous coordinates onto the specified 2D coordinate grid (i.e. image plane).static MatrixProjection.getOrthogonal(double xMin, double xMax, double yMin, double yMax, double nearClip, double farClip) Creates a \( 4\times4 \) orthogonal projection matrix to project a 3D point in homogeneous coordinates onto the specified 2D coordinate grid (i.e. image plane).static MatrixProjection.getOrthogonal2D(double xMax, double yMax) Creates a \( 4\times4 \) orthogonal projection matrix to project a 2D point in an orthographic viewing region.static MatrixProjection.getOrthogonal2D(double xMin, double xMax, double yMin, double yMax) Creates a \( 4\times4 \) orthogonal projection matrix to project a 2D point in an orthographic viewing region.static MatrixProjection.getPerspective(double fov, double aspectRatio, double nearClip, double farClip) Creates a \( 4\times4 \) perspective projection matrix to transform a 3D point represented in homogeneous coordinates.static MatrixProjection.getPerspective(double fovX, double fovY, double aspectRatio, double nearClip, double farClip) Creates a \( 4\times4 \) perspective projection matrix to transform a 3D point represented in homogeneous coordinates.static MatrixHouseholder.getReflector(Vector normal) Computes the Householder reflector which describes a reflection through a hyperplane containing the origin which is normal to the specifiednormalvector.static MatrixGivens.getRotator(double[] v, int i) Constructs a Givens rotator \( G \) such that for a vector \( \mathbf{v} \), \[ G\mathbf{v} = \begin{bmatrix} r_1 & \cdots & r_i & \cdots r_n \end{bmatrix} \] where \( r_{i} = 0 \).static MatrixGivens.getRotator(Vector v, int i) Constructs a Givens rotator \( G \) such that for a vector \( \mathbf{v} \), \[ G\mathbf{v} = \begin{bmatrix} r_1 & \cdots & r_i & \cdots r_n \end{bmatrix} \] where \( r_{i} = 0 \).static MatrixConstructs a view matrix for a camera at world positioncameraPos, looking at the pointcenterwhereupis the direction of the upwards vector in world coordinates.static MatrixRotation.rotate2D(double theta) Constructs a rotation matrix, \( R\left(\theta \right) \), which rotates 2D column vectors \( \theta \) radians.static MatrixRotation.rotate3D(double yaw, double pitch, double roll) Constructs a 3D rotation matrix, \[ \begin{align*} R\left(\alpha , \beta , \gamma \right) \end{align*} \], representing a rotation with yaw, pitch, and roll angles \( \alpha \), \( \beta \), and \( \gamma \) respectively.static MatrixConstructs a 3D rotation matrix, \( R_{u}\left(\theta \right) \), which representing a rotation of \( \theta \) radians about an axis unit vector u.static MatrixRotation.rotateEuler(double alpha, double beta, double gamma) Constructs a 3D rotation matrix, \( R_{E}\left(\alpha , \beta , \gamma \right) \), representing a rotation described by proper Euler angles \( \left(\alpha , \beta , \gamma \right) \).static MatrixRotation.rotateX3D(double theta) Constructs a matrix which rotates 3D column vectors about the \( x \)-axis \( \theta \) radians.static MatrixRotation.rotateY3D(double theta) Constructs a matrix which rotates 3D column vectors about the \( y \)-axis \( \theta \) radians.static MatrixRotation.rotateZ3D(double theta) Constructs a matrix which rotates 3D column vectors about the \( z \)-axis \( \theta \) radians.Methods in org.flag4j.linalg.transformations with parameters of type MatrixModifier and TypeMethodDescriptionstatic voidGivens.leftMult2x2Rotator(Matrix src, Matrix G, int i, double[] workArray) Left multiplies a \( 2\times2 \) Givens rotator to a matrix at the specified i.static voidHouseholder.leftMultReflector(Matrix src, double[] householderVector, double alpha, int startCol, int startRow, int endRow, double[] workArray) Left multiplies a Householder matrix \( H = I - \alpha vv^{T} \), represented by the vector v, to another matrix A.static voidHouseholder.leftMultReflector(Matrix src, Vector householderVector, double alpha, int startCol, int startRow, int endRow) Left multiplies a Householder matrix \( H = I-\alpha vv^{T} \), represented by the vector \( v \), to another matrix \( A \).static voidGivens.rightMult2x2Rotator(Matrix src, Matrix G, int i, double[] workArray) Right multiplies a \( 2\times2 \) Givens rotator to a matrix at the specified i.static voidHouseholder.rightMultReflector(Matrix src, double[] householderVector, double alpha, int startCol, int startRow, int endRow) Right multiplies a Householder matrix \( H = I-\alpha vv^{T} \), represented by the vector \( v \), to another matrix \( A \).static voidHouseholder.rightMultReflector(Matrix src, Vector householderVector, double alpha, int startCol, int startRow, int endRow) Right multiplies a Householder matrix \( H = I-\alpha vv^{T} \), represented by the vector \( v \), to another matrix \( A \).static voidHouseholder.symmLeftRightMultReflector(Matrix src, double[] householderVector, double alpha, int startCol, double[] workArray) Applies a Householder matrix \( H = I-\alpha vv^{T} \), represented by the vector \( v \) to a symmetric matrix \( A \) on both the left and right side. -
Uses of Matrix in org.flag4j.rng
Methods in org.flag4j.rng that return MatrixModifier and TypeMethodDescriptionRandomDenseTensor.randnMatrix(Shape shape) Generates a matrix filled with pseudorandom values sampled from a normal distribution with mean of 0.0 and standard deviation of 1.0.RandomDenseTensor.randnMatrix(Shape shape, double mean, double std) Generates a matrix filled with pseudorandom values sampled from a normal distribution with specified mean and standard deviation.RandomDenseTensor.randomDiagMatrix(int size, int min, int max) Generates a random diagonal matrix whose diagonal entries are uniformly distributed in [min,max).RandomDenseTensor.randomMatrix(Shape shape) Generates a matrix filled with pseudorandom values uniformly distributed in[0, 1).RandomDenseTensor.randomMatrix(Shape shape, double min, double max) Generates a matrix filled with pseudorandom values uniformly distributed in[min, max).RandomDenseTensor.randomOrthogonalMatrix(int size) Gets a pseudorandom orthogonal matrix.RandomDenseTensor.randomSymmetricMatrix(int size) Generates a symmetric matrix filled with pseudorandom values uniformly distributed in[0, 1).RandomDenseTensor.randomSymmPosDefMatrix(int size) Generates a pseudorandom symmetric positive-definite matrix.RandomDenseTensor.randomTrilMatrix(int size, int min, int max) Gets a pseudorandom lower triangular matrix of the specifiedsize.RandomDenseTensor.randomTriuMatrix(int size, int min, int max) Gets a pseudorandom upper triangular matrix of the specifiedsize.