Package org.ejml.sparse.csc
Class CommonOpsWithSemiRing_DSCC
java.lang.Object
org.ejml.sparse.csc.CommonOpsWithSemiRing_DSCC
-
Method Summary
Modifier and TypeMethodDescriptionstatic DMatrixSparseCSC
add
(double alpha, DMatrixSparseCSC A, double beta, DMatrixSparseCSC B, @Nullable DMatrixSparseCSC output, DSemiRing semiRing, @Nullable Mask mask, @Nullable IGrowArray gw, @Nullable DGrowArray gx) Performs matrix addition:
output = αA + βBstatic DMatrixSparseCSC
elementMult
(DMatrixSparseCSC A, DMatrixSparseCSC B, @Nullable DMatrixSparseCSC output, DSemiRing semiRing, @Nullable Mask mask, @Nullable IGrowArray gw, @Nullable DGrowArray gx) Performs an element-wise multiplication.
output[i,j] = A[i,j]*B[i,j]
All matrices must have the same shape.static DMatrixRMaj
mult
(DMatrixSparseCSC A, DMatrixRMaj B, @Nullable DMatrixRMaj output, DSemiRing semiRing) Performs matrix multiplication.static DMatrixSparseCSC
mult
(DMatrixSparseCSC A, DMatrixSparseCSC B, @Nullable DMatrixSparseCSC output, DSemiRing semiRing) static DMatrixSparseCSC
mult
(DMatrixSparseCSC A, DMatrixSparseCSC B, @Nullable DMatrixSparseCSC output, DSemiRing semiRing, @Nullable Mask mask, @Nullable IGrowArray gw, @Nullable DGrowArray gx) Performs matrix multiplication.static void
multAdd
(DMatrixSparseCSC A, DMatrixRMaj B, DMatrixRMaj output, DSemiRing semiRing) output = output + A*Bstatic void
multAddTransA
(DMatrixSparseCSC A, DMatrixRMaj B, DMatrixRMaj output, DSemiRing semiRing) output = output + AT*Bstatic void
multAddTransAB
(DMatrixSparseCSC A, DMatrixRMaj B, DMatrixRMaj C, DSemiRing semiRing) C = C + AT*BTstatic void
multAddTransB
(DMatrixSparseCSC A, DMatrixRMaj B, DMatrixRMaj output, DSemiRing semiRing) output = output + A*BTstatic DMatrixRMaj
multTransA
(DMatrixSparseCSC A, DMatrixRMaj B, @Nullable DMatrixRMaj output, DSemiRing semiRing) Performs matrix multiplication.static DMatrixRMaj
multTransAB
(DMatrixSparseCSC A, DMatrixRMaj B, DMatrixRMaj output, DSemiRing semiRing) Performs matrix multiplication.static DMatrixRMaj
multTransB
(DMatrixSparseCSC A, DMatrixRMaj B, @Nullable DMatrixRMaj output, DSemiRing semiRing) Performs matrix multiplication.
-
Method Details
-
mult
public static DMatrixSparseCSC mult(DMatrixSparseCSC A, DMatrixSparseCSC B, @Nullable @Nullable DMatrixSparseCSC output, DSemiRing semiRing) -
mult
public static DMatrixSparseCSC mult(DMatrixSparseCSC A, DMatrixSparseCSC B, @Nullable @Nullable DMatrixSparseCSC output, DSemiRing semiRing, @Nullable @Nullable Mask mask, @Nullable @Nullable IGrowArray gw, @Nullable @Nullable DGrowArray gx) Performs matrix multiplication. output = A*B- Parameters:
A
- (Input) Matrix. Not modified.B
- (Input) Matrix. Not modified.output
- (Output) Storage for results. Data length is increased if insufficient.semiRing
- Semi-Ring to define + and *mask
- (Optional) Mask for specifying which entries should be overwrittengw
- (Optional) Storage for internal workspace. Can be null.gx
- (Optional) Storage for internal workspace. Can be null.
-
mult
public static DMatrixRMaj mult(DMatrixSparseCSC A, DMatrixRMaj B, @Nullable @Nullable DMatrixRMaj output, DSemiRing semiRing) Performs matrix multiplication. output = A*B- Parameters:
A
- MatrixB
- Dense MatrixsemiRing
- Semi-Ring to define + and *output
- Dense Matrix
-
multAdd
public static void multAdd(DMatrixSparseCSC A, DMatrixRMaj B, DMatrixRMaj output, DSemiRing semiRing) output = output + A*B
-
multTransA
public static DMatrixRMaj multTransA(DMatrixSparseCSC A, DMatrixRMaj B, @Nullable @Nullable DMatrixRMaj output, DSemiRing semiRing) Performs matrix multiplication. output = AT*B- Parameters:
A
- MatrixB
- Dense Matrixoutput
- Dense MatrixsemiRing
- Semi-Ring to define + and *
-
multAddTransA
public static void multAddTransA(DMatrixSparseCSC A, DMatrixRMaj B, DMatrixRMaj output, DSemiRing semiRing) output = output + AT*B
-
multTransB
public static DMatrixRMaj multTransB(DMatrixSparseCSC A, DMatrixRMaj B, @Nullable @Nullable DMatrixRMaj output, DSemiRing semiRing) Performs matrix multiplication. output = A*BT- Parameters:
A
- MatrixB
- Dense Matrixoutput
- Dense MatrixsemiRing
- Semi-Ring to define + and *
-
multAddTransB
public static void multAddTransB(DMatrixSparseCSC A, DMatrixRMaj B, DMatrixRMaj output, DSemiRing semiRing) output = output + A*BT
-
multTransAB
public static DMatrixRMaj multTransAB(DMatrixSparseCSC A, DMatrixRMaj B, DMatrixRMaj output, DSemiRing semiRing) Performs matrix multiplication. output = AT*BT- Parameters:
A
- MatrixB
- Dense Matrixoutput
- Dense MatrixsemiRing
- Semi-Ring to define + and *
-
multAddTransAB
public static void multAddTransAB(DMatrixSparseCSC A, DMatrixRMaj B, DMatrixRMaj C, DSemiRing semiRing) C = C + AT*BT
-
add
public static DMatrixSparseCSC add(double alpha, DMatrixSparseCSC A, double beta, DMatrixSparseCSC B, @Nullable @Nullable DMatrixSparseCSC output, DSemiRing semiRing, @Nullable @Nullable Mask mask, @Nullable @Nullable IGrowArray gw, @Nullable @Nullable DGrowArray gx) Performs matrix addition:
output = αA + βB- Parameters:
alpha
- scalar value multiplied against AA
- Matrixbeta
- scalar value multiplied against BB
- Matrixoutput
- (Optional) Output matrix.semiRing
- Semi-Ring to define + and *mask
- (Optional) Mask for specifying which entries should be overwrittengw
- (Optional) Storage for internal workspace. Can be null.gx
- (Optional) Storage for internal workspace. Can be null.
-
elementMult
public static DMatrixSparseCSC elementMult(DMatrixSparseCSC A, DMatrixSparseCSC B, @Nullable @Nullable DMatrixSparseCSC output, DSemiRing semiRing, @Nullable @Nullable Mask mask, @Nullable @Nullable IGrowArray gw, @Nullable @Nullable DGrowArray gx) Performs an element-wise multiplication.
output[i,j] = A[i,j]*B[i,j]
All matrices must have the same shape.- Parameters:
A
- (Input) Matrix.B
- (Input) Matrixoutput
- (Output) Matrix. data array is grown to min(A.nz_length,B.nz_length), resulting a in a large speed boost.semiRing
- Semi-Ring to define + and *mask
- (Optional) Mask for specifying which entries should be overwrittengw
- (Optional) Storage for internal workspace. Can be null.gx
- (Optional) Storage for internal workspace. Can be null.
-