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.
General purpose linear algebra operations including condition number evaluations, eigenvalue/eigenvector computations, matrix
inversion, and subspace analysis.
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 TMatrixMixin<?, ?, ?, ?> -
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 TypeClassDescriptionclassInstances 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 TypeClassDescriptionclassInstances 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 theshapeanddataand 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 exchangingaxis1andaxis2.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.static CsrMatrixCsrMatrix.unsafeMake(Shape shape, double[] data, int[] rowPointers, int[] colIndices) Factory to construct a CSR matrix which bypasses any validation checks on the data and indices.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 thebtensor 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 doubleComputes the max norm of a matrix.static doubleComputes the Frobenius (\( L_{2, 2} \)) of this matrix.static doubleComputes the \( L_{p,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 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.Methods in org.flag4j.linalg.ops.dense_sparse.csr.real with parameters of type CsrMatrixModifier 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 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 VectorRealCsrDenseMatMult.standardVector(CsrMatrix src1, Vector src2) Computes the matrix-vector multiplication between a real sparse CSR matrix and a real dense vector.static MatrixComputes 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 CMatrixRealComplexCsrDenseOps.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) = 0dandopp.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) = 0dwherexis 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 CsrMatrixSparseUtils.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 booleanChecks if twoCSR Matricesare equal considering the fact that one may explicitly store zeros at some position that the other does not store.static CsrMatrixSparseUtils.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 CsrMatrixRealCsrOps.applyBinOpp(CsrMatrix src1, CsrMatrix src2, BinaryOperator<Double> bOpp, UnaryOperator<Double> uOpp) Applies an element-wise binary operation to twoCSR Matrices.static CsrMatrixComputes the element-wise multiplication between two real CSR matrices.static CsrMatrixGets a specified slice of a CSR matrix.static CsrMatrixRealCsrMatMult.standardAsSparse(CsrMatrix src1, CsrMatrix src2) Computes the matrix multiplication between two sparse CSR matrices and returns the result as a sparse matrix.static CsrMatrixTransposes a sparse CSR matrix.Methods in org.flag4j.linalg.ops.sparse.csr.real with parameters of type CsrMatrixModifier and TypeMethodDescriptionstatic booleanChecks if all data of this tensor are close to the data of the argumenttensor.static CsrMatrixRealCsrOps.applyBinOpp(CsrMatrix src1, CsrMatrix src2, BinaryOperator<Double> bOpp, UnaryOperator<Double> uOpp) Applies an element-wise binary operation to twoCSR Matrices.static CsrMatrixComputes the element-wise multiplication between two real CSR matrices.static CsrMatrixGets a specified slice of a CSR matrix.static booleanRealCsrProperties.isAntiSymmetric(CsrMatrix src) Checks if thesrcmatrix is anti-symmetric.static booleanRealCsrProperties.isCloseToIdentity(CsrMatrix src) Checks if thesrcmatrix is close to the identity matrix.static booleanRealCsrProperties.isIdentity(CsrMatrix src) Checks if thesrcmatrix is the identity matrix.static booleanRealCsrProperties.isSymmetric(CsrMatrix src) Checks if thesrcmatrix is symmetric.static MatrixComputes the matrix multiplication between two sparse CSR matrices.static CsrMatrixRealCsrMatMult.standardAsSparse(CsrMatrix src1, CsrMatrix src2) Computes the matrix multiplication between two sparse CSR matrices and returns the result as a sparse matrix.static VectorRealCsrMatMult.standardVector(CsrMatrix src1, CooVector src2) Computes the matrix-vector multiplication between a real sparse CSR matrix and a real sparse COO vector.static voidSwaps two columns in a sparse CSR matrix.static voidSwaps two rows in a sparse CSR matrix.static MatrixComputes the tensor contraction ofsrc1withsrc2over the specified set of axes.static CsrMatrixTransposes 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 CsrCMatrixRealComplexCsrOps.add(CsrCMatrix a, CsrMatrix b) Computes the element-wise sum of two matrices.static CsrCMatrixRealComplexCsrOps.applyBinOpp(CsrCMatrix src1, CsrMatrix src2, BiFunction<Complex128, Double, Complex128> opp, UnaryOperator<Double> uOpp) Applies an element-wise binary operation to twoCSR Matrices.static CsrCMatrixRealComplexCsrOps.applyBinOpp(CsrMatrix src1, CsrCMatrix src2, BiFunction<Double, Complex128, Complex128> opp, UnaryOperator<Complex128> uOpp) Applies an element-wise binary operation to twoCSR Matrices.static CsrCMatrixRealComplexCsrOps.elemMult(CsrCMatrix src1, CsrMatrix src2) Computes the element-wise multiplication between a complex sparse matrix and a real sparse matrix.static CMatrixRealComplexCsrMatMult.standard(CsrCMatrix src1, CsrMatrix src2) Computes the matrix multiplication between two sparse CSR matrices.static CMatrixRealComplexCsrMatMult.standard(CsrMatrix src1, CsrCMatrix src2) Computes the matrix multiplication between two sparse CSR matrices.static CsrCMatrixRealComplexCsrMatMult.standardAsSparse(CsrCMatrix src1, CsrMatrix src2) Computes the matrix multiplication between two sparse CSR matrices and returns the result as a sparse matrix.static CsrCMatrixRealComplexCsrMatMult.standardAsSparse(CsrMatrix src1, CsrCMatrix src2) Computes the matrix multiplication between two sparse CSR matrices and returns the result as a sparse matrix.static CVectorRealComplexCsrMatMult.standardVector(CsrMatrix src1, CooCVector src2) Computes the matrix-vector multiplication between a real sparse CSR matrix and a complex sparse COO vector.static CsrCMatrixRealComplexCsrOps.sub(CsrCMatrix a, CsrMatrix b) Computes the element-wise difference of two matrices.static CsrCMatrixRealComplexCsrOps.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 nnz) 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 nnz) 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 matrixfilled with pseudorandom values uniformly distributed in[min, max).