Uses of Class
org.flag4j.arrays.sparse.CsrMatrix
Packages that use CsrMatrix
Package
Description
Provides implementations for dense tensors, matrices, and vectors.
Contains implementations for sparse tensors, matrices, and vectors.
This package contains classes for Pseudo-random generation of real/complex numbers, and arrays, vectors,
matrices, and tensors.
-
Uses of CsrMatrix in org.flag4j.arrays.backend.field_arrays
Methods in org.flag4j.arrays.backend.field_arrays that return CsrMatrix -
Uses of CsrMatrix in org.flag4j.arrays.backend.smart_visitors
Methods in org.flag4j.arrays.backend.smart_visitors with parameters of type CsrMatrixModifier and TypeMethodDescriptionMatrixMixin
<?, ?, ?, ?> MatrixMixin
<?, ?, ?, ?> MatrixMixin
<?, ?, ?, ?> MatrixMixin
<?, ?, ?, ?> abstract T
MatrixMixin
<?, ?, ?, ?> -
Uses of CsrMatrix in org.flag4j.arrays.dense
Methods in org.flag4j.arrays.dense that return CsrMatrixModifier and TypeMethodDescriptionMatrix.toCsr()
Converts this dense matrix to sparse CSR matrix.Methods in org.flag4j.arrays.dense with parameters of type CsrMatrixModifier and TypeMethodDescriptionSums this matrix with a real sparse CSR matrix.Computes the matrix multiplication between two matrices.Computes the matrix multiplication between this matrix and a real sparse CSR matrix.Computes the difference of this matrix with a real sparse CSR matrix. -
Uses of CsrMatrix in org.flag4j.arrays.sparse
Subclasses with type arguments of type CsrMatrix in org.flag4j.arrays.sparseModifier and TypeClassDescriptionclass
Instances of this class represent a real sparse matrix using the compressed sparse row (CSR) format.Classes in org.flag4j.arrays.sparse that implement interfaces with type arguments of type CsrMatrixModifier and TypeClassDescriptionclass
Instances of this class represent a real sparse matrix using the compressed sparse row (CSR) format.Methods in org.flag4j.arrays.sparse that return CsrMatrixModifier and TypeMethodDescriptionCsrRingMatrix.abs()
Computes the element-wise absolute value of this tensor.Computes the element-wise sum between two tensors of the same shape.Augments a vector to this matrix.Stacks matrices along rows.CsrMatrix.coalesce()
Coalesces this sparse CSR matrix.CsrMatrix.coalesce
(BinaryOperator<Double> aggregator) Coalesces this sparse COO matrix.Computes the element-wise quotient between two tensors.CsrMatrix.dropZeros()
Drops any explicit zeros in this sparse COO matrix.Computes the element-wise multiplication of two tensors of the same shape.CsrMatrix.flatten()
Flattens tensor to single dimension while preserving order of data.CsrMatrix.flatten
(int axis) Flattens a tensor along the specified axis.CsrMatrix.getSlice
(int rowStart, int rowEnd, int colStart, int colEnd) Gets a specified slice of this matrix.CsrMatrix.getTriL
(int diagOffset) Extracts the lower-triangular portion of this matrix with a specified diagonal offset.CsrMatrix.getTriU
(int diagOffset) Extracts the upper-triangular portion of this matrix with a specified diagonal offset.CsrMatrix.H()
Computes the conjugate transpose of a tensor by exchanging the first and last axes of this tensor and conjugating the exchanged values.CsrMatrix.makeLikeTensor
(Shape shape, double[] entries) Constructs a CSR matrix of the same type as this matrix with the given theshape
anddata
and the same row pointers and column indices as this matrix.Computes the matrix multiplication between two sparse CSR matrices and stores the result in a CSR matrix.CsrMatrix.removeCol
(int colIndex) Removes a specified column from this matrix.CsrMatrix.removeCols
(int... colIndices) Removes a specified set of columns from this matrix.CsrMatrix.removeRow
(int rowIndex) Removes a specified row from this matrix.CsrMatrix.removeRows
(int... rowIndices) Removes a specified set of rows from this matrix.Copies and reshapes this tensor.Sets the element of this tensor at the specified indices.Sets an index of this matrix to the specified value.Sets a column 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.CsrMatrix.setSliceCopy
(CsrMatrix values, int rowStart, int colStart) Creates a copy of this matrix and sets a slice of the copy to the specified values.Stacks matrices along columns.Computes the element-wise difference between two tensors of the same shape.CsrMatrix.swapCols
(int colIndex1, int colIndex2) Swaps specified columns in the matrix.CsrMatrix.swapRows
(int rowIndex1, int rowIndex2) Swaps specified rows in the matrix.CsrMatrix.T()
Computes the transpose of a tensor by exchanging the first and last axes of this tensor.CsrMatrix.T
(int... axes) Computes the transpose of this tensor.CsrMatrix.T
(int axis1, int axis2) Computes the transpose of a tensor by exchangingaxis1
andaxis2
.CooMatrix.toCsr()
Converts this COO matrix to an equivalent CSR matrix.PermutationMatrix.toCsr()
Converts this permutation matrix to areal sparse COO matrix
.CsrCMatrix.toReal()
Converts this matrix to an equivalent real matrix.Methods in org.flag4j.arrays.sparse with parameters of type CsrMatrixModifier 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.Computes the matrix multiplication between two matrices.Computes the matrix multiplication between two sparse CSR matrices and stores the result in a CSR matrix.CsrMatrix.multTranspose
(CsrMatrix b) Multiplies this matrix with the transpose of theb
tensor as if bythis.mult(b.T())
.CsrMatrix.setSliceCopy
(CsrMatrix values, int rowStart, int colStart) Creates a copy of this matrix and sets a slice of the copy to the specified values.Stacks matrices along columns.Computes the element-wise difference between two tensors of the same shape.Computes the tensor contraction of this tensor with a specified tensor over the specified set of axes. -
Uses of CsrMatrix in org.flag4j.linalg
Methods in org.flag4j.linalg with parameters of type CsrMatrixModifier and TypeMethodDescriptionstatic double
Computes the max norm of a matrix.static double
Computes the Frobenius (L2, 2) of this matrix.static double
Computes the Lp, q norm of a real CSR matrix. -
Uses of CsrMatrix in org.flag4j.linalg.ops.dense_sparse.csr.real
Methods in org.flag4j.linalg.ops.dense_sparse.csr.real that return CsrMatrixModifier and TypeMethodDescriptionstatic CsrMatrix
RealCsrDenseOps.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) = 0d
andopp.apply(0d, x) = 0d
.Methods in org.flag4j.linalg.ops.dense_sparse.csr.real with parameters of type CsrMatrixModifier and TypeMethodDescriptionstatic Matrix
Computes the element-wise sum of two matrices.static Matrix
RealCsrDenseOps.applyBinOpp
(Matrix src1, CsrMatrix src2, BinaryOperator<Double> opp) Applies the specified binary operator element-wise to the two matrices.static Matrix
RealCsrDenseOps.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 Matrix
RealCsrDenseOps.applyBinOpp
(CsrMatrix src1, Matrix src2, BinaryOperator<Double> opp, UnaryOperator<Double> uOpp) Applies the specified binary operator element-wise to the two matrices.static CsrMatrix
RealCsrDenseOps.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) = 0d
andopp.apply(0d, x) = 0d
.static Matrix
Computes the matrix multiplication between a real dense matrix and a real sparse CSR matrix.static Matrix
Computes the matrix multiplication between a real sparse CSR matrix and a real dense matrix.static Matrix
RealCsrDenseMatrixMultiplication.standardTranspose
(CsrMatrix src1, Matrix src2) Computes the matrix multiplication between a real sparse CSR matrix and the transpose of a real dense matrix.static Vector
RealCsrDenseMatrixMultiplication.standardVector
(CsrMatrix src1, Vector src2) Computes the matrix-vector multiplication between a real sparse CSR matrix and a real dense vector.static Matrix
Computes the element-wise difference of two matrices. -
Uses of CsrMatrix 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 CsrMatrixModifier and TypeMethodDescriptionstatic CMatrix
RealComplexCsrDenseOps.applyBinOpp
(CsrMatrix src1, Complex128 b, BiFunction<Double, Complex128, Complex128> opp, UnaryOperator<Complex128> uOpp) Applies the specified binary operator element-wise to a matrix and a scalar. -
Uses of CsrMatrix 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 CsrMatrixModifier and TypeMethodDescriptionstatic <T extends Field<T>>
AbstractDenseFieldMatrix<?, ?, T> RealFieldDenseCsrOps.add
(CsrMatrix a, AbstractDenseFieldMatrix<?, ?, T> b) Computes the element-wise sum of two matrices.static <T extends Field<T>>
AbstractDenseFieldMatrix<?, ?, T> RealFieldDenseCsrOps.applyBinOpp
(AbstractDenseFieldMatrix<?, ?, T> src1, CsrMatrix src2, BiFunction<T, Double, T> opp) Applies the specified binary operator element-wise to the two matrices.static <T extends Field<T>>
AbstractDenseFieldMatrix<?, ?, T> RealFieldDenseCsrOps.applyBinOpp
(CsrMatrix src1, AbstractDenseFieldMatrix<?, ?, T> src2, BiFunction<Double, T, T> opp, UnaryOperator<T> uOpp) Applies the specified binary operator element-wise to the two matrices.static <T extends Field<T>>
AbstractCsrFieldMatrix<?, ?, ?, T> RealFieldDenseCsrOps.applyBinOppToSparse
(AbstractDenseFieldMatrix<?, ?, T> src1, CsrMatrix src2, BiFunction<T, Double, T> opp) Applies an element-wise binary operation to a real dense and real sparse CSR matrix under the assumption thatopp.apply(x, 0d) = 0d
andopp.apply(0d, x) = 0d
.static <T extends Field<T>>
AbstractCsrFieldMatrix<?, ?, ?, T> RealFieldDenseCsrOps.applyBinOppToSparse
(CsrMatrix src1, AbstractDenseFieldMatrix<?, ?, T> src2, BiFunction<Double, T, T> opp) Applies an element-wise binary operation to a real sparse and complex dense CSR matrix under the assumption thatopp.apply(0d, x) = 0d
wherex
is aComplex128
.static <T extends Field<T>>
AbstractDenseFieldMatrix<?, ?, T> RealFieldDenseCsrMatMult.standard
(AbstractDenseFieldMatrix<?, ?, T> src1, CsrMatrix src2) Computes the matrix multiplication between a real dense matrix and a real sparse CSR matrix.static <T extends Field<T>>
AbstractDenseFieldMatrix<?, ?, T> RealFieldDenseCsrMatMult.standard
(CsrMatrix src1, AbstractDenseFieldMatrix<?, ?, T> src2) Computes the matrix multiplication between a real sparse CSR matrix and a complex dense matrix.static <T extends Field<T>>
AbstractDenseFieldMatrix<?, ?, T> RealFieldDenseCsrMatMult.standardTranspose
(CsrMatrix src1, AbstractDenseFieldMatrix<?, ?, T> src2) Computes the matrix multiplication between a real sparse CSR matrix and the transpose of a complex dense matrix.static <T extends Field<T>>
AbstractDenseFieldVector<?, ?, T> RealFieldDenseCsrMatMult.standardVector
(CsrMatrix src1, AbstractDenseFieldVector<?, ?, T> src2) Computes the matrix-vector multiplication between a real sparse CSR matrix and a complex dense vector.static <T extends Field<T>>
AbstractDenseFieldMatrix<?, ?, T> RealFieldDenseCsrOps.sub
(AbstractDenseFieldMatrix<?, ?, T> a, CsrMatrix b) Computes the element-wise difference of two matrices.static <T extends Field<T>>
AbstractDenseFieldMatrix<?, ?, T> RealFieldDenseCsrOps.sub
(CsrMatrix a, AbstractDenseFieldMatrix<?, ?, T> b) Computes the element-wise difference of two matrices. -
Uses of CsrMatrix in org.flag4j.linalg.ops.sparse
Methods in org.flag4j.linalg.ops.sparse that return CsrMatrixModifier and TypeMethodDescriptionstatic CsrMatrix
SparseUtils.dropZerosCsr
(CsrMatrix src) Drops all explicit zeros within a sparse CSR matrix.Methods in org.flag4j.linalg.ops.sparse with parameters of type CsrMatrixModifier and TypeMethodDescriptionstatic boolean
Checks if twoCSR Matrices
are equal considering the fact that one may explicitly store zeros at some position that the other does not store.static CsrMatrix
SparseUtils.dropZerosCsr
(CsrMatrix src) Drops all explicit zeros within a sparse CSR matrix. -
Uses of CsrMatrix in org.flag4j.linalg.ops.sparse.csr.real
Methods in org.flag4j.linalg.ops.sparse.csr.real that return CsrMatrixModifier and TypeMethodDescriptionstatic CsrMatrix
RealCsrOps.applyBinOpp
(CsrMatrix src1, CsrMatrix src2, BinaryOperator<Double> bOpp, UnaryOperator<Double> uOpp) Applies an element-wise binary operation to twoCSR Matrices
.static CsrMatrix
Computes the element-wise multiplication between two real CSR matrices.static CsrMatrix
Gets a specified slice of a CSR matrix.static CsrMatrix
RealCsrMatMult.standardAsSparse
(CsrMatrix src1, CsrMatrix src2) Computes the matrix multiplication between two sparse CSR matrices and returns the result as a sparse matrix.static CsrMatrix
Transposes a sparse CSR matrix.Methods in org.flag4j.linalg.ops.sparse.csr.real with parameters of type CsrMatrixModifier and TypeMethodDescriptionstatic boolean
Checks if all data of this tensor are close to the data of the argumenttensor
.static CsrMatrix
RealCsrOps.applyBinOpp
(CsrMatrix src1, CsrMatrix src2, BinaryOperator<Double> bOpp, UnaryOperator<Double> uOpp) Applies an element-wise binary operation to twoCSR Matrices
.static CsrMatrix
Computes the element-wise multiplication between two real CSR matrices.static CsrMatrix
Gets a specified slice of a CSR matrix.static boolean
RealCsrProperties.isAntiSymmetric
(CsrMatrix src) Checks if thesrc
matrix is anti-symmetric.static boolean
RealCsrProperties.isCloseToIdentity
(CsrMatrix src) Checks if thesrc
matrix is close to the identity matrix.static boolean
RealCsrProperties.isIdentity
(CsrMatrix src) Checks if thesrc
matrix is the identity matrix.static boolean
RealCsrProperties.isSymmetric
(CsrMatrix src) Checks if thesrc
matrix is symmetric.static Matrix
Computes the matrix multiplication between two sparse CSR matrices.static CsrMatrix
RealCsrMatMult.standardAsSparse
(CsrMatrix src1, CsrMatrix src2) Computes the matrix multiplication between two sparse CSR matrices and returns the result as a sparse matrix.static Vector
RealCsrMatMult.standardVector
(CsrMatrix src1, CooVector src2) Computes the matrix-vector multiplication between a real sparse CSR matrix and a real sparse COO vector.static void
Swaps two columns in a sparse CSR matrix.static void
Swaps two rows in a sparse CSR matrix.static Matrix
Computes the tensor contraction ofsrc1
withsrc2
over the specified set of axes.static CsrMatrix
Transposes a sparse CSR matrix. -
Uses of CsrMatrix in org.flag4j.linalg.ops.sparse.csr.real_complex
Methods in org.flag4j.linalg.ops.sparse.csr.real_complex with parameters of type CsrMatrixModifier and TypeMethodDescriptionstatic CsrCMatrix
RealComplexCsrOps.add
(CsrCMatrix a, CsrMatrix b) Computes the element-wise sum of two matrices.static CsrCMatrix
RealComplexCsrOps.applyBinOpp
(CsrCMatrix src1, CsrMatrix src2, BiFunction<Complex128, Double, Complex128> opp, UnaryOperator<Double> uOpp) Applies an element-wise binary operation to twoCSR Matrices
.static CsrCMatrix
RealComplexCsrOps.applyBinOpp
(CsrMatrix src1, CsrCMatrix src2, BiFunction<Double, Complex128, Complex128> opp, UnaryOperator<Complex128> uOpp) Applies an element-wise binary operation to twoCSR Matrices
.static CsrCMatrix
RealComplexCsrOps.elemMult
(CsrCMatrix src1, CsrMatrix src2) Computes the element-wise multiplication between a complex sparse matrix and a real sparse matrix.static CMatrix
RealComplexCsrMatMult.standard
(CsrCMatrix src1, CsrMatrix src2) Computes the matrix multiplication between two sparse CSR matrices.static CMatrix
RealComplexCsrMatMult.standard
(CsrMatrix src1, CsrCMatrix src2) Computes the matrix multiplication between two sparse CSR matrices.static CsrCMatrix
RealComplexCsrMatMult.standardAsSparse
(CsrCMatrix src1, CsrMatrix src2) Computes the matrix multiplication between two sparse CSR matrices and returns the result as a sparse matrix.static CsrCMatrix
RealComplexCsrMatMult.standardAsSparse
(CsrMatrix src1, CsrCMatrix src2) Computes the matrix multiplication between two sparse CSR matrices and returns the result as a sparse matrix.static CVector
RealComplexCsrMatMult.standardVector
(CsrMatrix src1, CooCVector src2) Computes the matrix-vector multiplication between a real sparse CSR matrix and a complex sparse COO vector.static CsrCMatrix
RealComplexCsrOps.sub
(CsrCMatrix a, CsrMatrix b) Computes the element-wise difference of two matrices.static CsrCMatrix
RealComplexCsrOps.sub
(CsrMatrix a, CsrCMatrix b) Computes the element-wise difference of two matrices. -
Uses of CsrMatrix in org.flag4j.rng
Methods in org.flag4j.rng that return CsrMatrixModifier and TypeMethodDescriptionRandomSparseTensor.randomCsrMatrix
(int rows, int cols, double min, double max, double sparsity) Generates a random sparse matrix with the specified sparsity.RandomSparseTensor.randomCsrMatrix
(int rows, int cols, double min, double max, int numNonZeroEntries) Generates a random sparse matrix with the specified number of non-zero data.RandomSparseTensor.randomCsrMatrix
(Shape shape, double min, double max, double sparsity) Generates a random sparse matrix with the specified sparsity.RandomSparseTensor.randomCsrMatrix
(Shape shape, double min, double max, int numNonZeroEntries) Generates a random sparse matrix with the specified number of non-zero data.RandomSparseTensor.randomSymmetricCsrMatrix
(int size, int min, int max, double sparsity) Generates a symmetricCSR matrix
filled with pseudorandom values uniformly distributed in[min, max)
.