diff --git a/main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOpsWithSemiRing_DSCC.java b/main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOpsWithSemiRing_DSCC.java index d9f941a47..601367e22 100644 --- a/main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOpsWithSemiRing_DSCC.java +++ b/main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOpsWithSemiRing_DSCC.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2020, Peter Abeles. All Rights Reserved. + * Copyright (c) 2020, Peter Abeles. All Rights Reserved. * * This file is part of Efficient Java Matrix Library (EJML). * @@ -25,7 +25,7 @@ import org.ejml.data.IGrowArray; import org.ejml.ops.DSemiRing; import org.ejml.sparse.csc.misc.ImplCommonOpsWithSemiRing_DSCC; -import org.ejml.sparse.csc.mult.ImplSparseSparseMultWithSemiRing_DSCC; +import org.ejml.sparse.csc.mult.ImplMultiplicationWithSemiRing_DSCC; import org.jetbrains.annotations.Nullable; import static org.ejml.UtilEjml.reshapeOrDeclare; @@ -54,7 +54,7 @@ public static DMatrixSparseCSC mult(DMatrixSparseCSC A, DMatrixSparseCSC B, @Nul throw new MatrixDimensionException("Inconsistent matrix shapes. " + stringShapes(A, B)); output = reshapeOrDeclare(output, A, A.numRows, B.numCols); - ImplSparseSparseMultWithSemiRing_DSCC.mult(A, B, output, semiRing, gw, gx); + ImplMultiplicationWithSemiRing_DSCC.mult(A, B, output, semiRing, gw, gx); return output; } @@ -73,7 +73,7 @@ public static DMatrixRMaj mult(DMatrixSparseCSC A, DMatrixRMaj B, @Nullable DMat output = reshapeOrDeclare(output, A.numRows, B.numCols); - ImplSparseSparseMultWithSemiRing_DSCC.mult(A, B, output, semiRing); + ImplMultiplicationWithSemiRing_DSCC.mult(A, B, output, semiRing); return output; } @@ -85,7 +85,7 @@ public static void multAdd(DMatrixSparseCSC A, DMatrixRMaj B, DMatrixRMaj output if (A.numRows != output.numRows || B.numCols != output.numCols) throw new IllegalArgumentException("Inconsistent matrix shapes. " + stringShapes(A, B, output)); - ImplSparseSparseMultWithSemiRing_DSCC.multAdd(A, B, output, semiRing); + ImplMultiplicationWithSemiRing_DSCC.multAdd(A, B, output, semiRing); } /** @@ -102,7 +102,7 @@ public static DMatrixRMaj multTransA(DMatrixSparseCSC A, DMatrixRMaj B, @Nullabl output = reshapeOrDeclare(output, A.numCols, B.numCols); - ImplSparseSparseMultWithSemiRing_DSCC.multTransA(A, B, output, semiRing); + ImplMultiplicationWithSemiRing_DSCC.multTransA(A, B, output, semiRing); return output; } @@ -114,7 +114,7 @@ public static void multAddTransA(DMatrixSparseCSC A, DMatrixRMaj B, DMatrixRMaj if (A.numCols != output.numRows || B.numCols != output.numCols) throw new IllegalArgumentException("Inconsistent matrix shapes. " + stringShapes(A, B, output)); - ImplSparseSparseMultWithSemiRing_DSCC.multAddTransA(A, B, output, semiRing); + ImplMultiplicationWithSemiRing_DSCC.multAddTransA(A, B, output, semiRing); } /** @@ -130,7 +130,7 @@ public static DMatrixRMaj multTransB(DMatrixSparseCSC A, DMatrixRMaj B, @Nullabl throw new MatrixDimensionException("Inconsistent matrix shapes. " + stringShapes(A, B)); output = reshapeOrDeclare(output, A.numRows, B.numRows); - ImplSparseSparseMultWithSemiRing_DSCC.multTransB(A, B, output, semiRing); + ImplMultiplicationWithSemiRing_DSCC.multTransB(A, B, output, semiRing); return output; } @@ -142,7 +142,7 @@ public static void multAddTransB(DMatrixSparseCSC A, DMatrixRMaj B, DMatrixRMaj if (A.numRows != output.numRows || B.numRows != output.numCols) throw new IllegalArgumentException("Inconsistent matrix shapes. " + stringShapes(A, B, output)); - ImplSparseSparseMultWithSemiRing_DSCC.multAddTransB(A, B, output, semiRing); + ImplMultiplicationWithSemiRing_DSCC.multAddTransB(A, B, output, semiRing); } /** @@ -158,7 +158,7 @@ public static DMatrixRMaj multTransAB(DMatrixSparseCSC A, DMatrixRMaj B, DMatrix throw new MatrixDimensionException("Inconsistent matrix shapes. " + stringShapes(A, B)); output = reshapeOrDeclare(output, A.numCols, B.numRows); - ImplSparseSparseMultWithSemiRing_DSCC.multTransAB(A, B, output, semiRing); + ImplMultiplicationWithSemiRing_DSCC.multTransAB(A, B, output, semiRing); return output; } @@ -171,7 +171,7 @@ public static void multAddTransAB(DMatrixSparseCSC A, DMatrixRMaj B, DMatrixRMaj if (A.numCols != C.numRows || B.numRows != C.numCols) throw new IllegalArgumentException("Inconsistent matrix shapes. " + stringShapes(A, B, C)); - ImplSparseSparseMultWithSemiRing_DSCC.multAddTransAB(A, B, C, semiRing); + ImplMultiplicationWithSemiRing_DSCC.multAddTransAB(A, B, C, semiRing); } /** diff --git a/main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java b/main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java index d691195df..91fcd9cd5 100644 --- a/main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java +++ b/main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java @@ -33,7 +33,7 @@ import org.ejml.sparse.csc.factory.DecompositionFactory_DSCC; import org.ejml.sparse.csc.factory.LinearSolverFactory_DSCC; import org.ejml.sparse.csc.misc.ImplCommonOps_DSCC; -import org.ejml.sparse.csc.mult.ImplSparseSparseMult_DSCC; +import org.ejml.sparse.csc.mult.ImplMultiplication_DSCC; import org.jetbrains.annotations.Nullable; import java.util.Arrays; @@ -147,7 +147,7 @@ public static DMatrixSparseCSC mult( DMatrixSparseCSC A, DMatrixSparseCSC B, throw new MatrixDimensionException("Inconsistent matrix shapes. " + stringShapes(A, B)); outputC = reshapeOrDeclare(outputC, A, A.numRows, B.numCols); - ImplSparseSparseMult_DSCC.mult(A, B, outputC, gw, gx); + ImplMultiplication_DSCC.mult(A, B, outputC, gw, gx); return outputC; } @@ -164,7 +164,7 @@ public static DMatrixRMaj mult( DMatrixSparseCSC A, DMatrixRMaj B, @Nullable DMa throw new MatrixDimensionException("Inconsistent matrix shapes. " + stringShapes(A, B)); outputC = reshapeOrDeclare(outputC, A.numRows, B.numCols); - ImplSparseSparseMult_DSCC.mult(A, B, outputC); + ImplMultiplication_DSCC.mult(A, B, outputC); return outputC; } @@ -178,7 +178,7 @@ public static void multAdd( DMatrixSparseCSC A, DMatrixRMaj B, DMatrixRMaj outpu if (A.numRows != outputC.numRows || B.numCols != outputC.numCols) throw new MatrixDimensionException("Inconsistent matrix shapes. " + stringShapes(A, B, outputC)); - ImplSparseSparseMult_DSCC.multAdd(A, B, outputC); + ImplMultiplication_DSCC.multAdd(A, B, outputC); } /** @@ -194,7 +194,7 @@ public static DMatrixRMaj multTransA( DMatrixSparseCSC A, DMatrixRMaj B, @Nullab outputC = reshapeOrDeclare(outputC, A.numCols, B.numCols); - ImplSparseSparseMult_DSCC.multTransA(A, B, outputC); + ImplMultiplication_DSCC.multTransA(A, B, outputC); return outputC; } @@ -208,7 +208,7 @@ public static void multAddTransA( DMatrixSparseCSC A, DMatrixRMaj B, DMatrixRMaj if (A.numCols != outputC.numRows || B.numCols != outputC.numCols) throw new MatrixDimensionException("Inconsistent matrix shapes. " + stringShapes(A, B, outputC)); - ImplSparseSparseMult_DSCC.multAddTransA(A, B, outputC); + ImplMultiplication_DSCC.multAddTransA(A, B, outputC); } /** @@ -223,7 +223,7 @@ public static DMatrixRMaj multTransB( DMatrixSparseCSC A, DMatrixRMaj B, @Nullab throw new MatrixDimensionException("Inconsistent matrix shapes. " + stringShapes(A, B)); outputC = reshapeOrDeclare(outputC, A.numRows, B.numRows); - ImplSparseSparseMult_DSCC.multTransB(A, B, outputC); + ImplMultiplication_DSCC.multTransB(A, B, outputC); return outputC; } @@ -237,7 +237,7 @@ public static void multAddTransB( DMatrixSparseCSC A, DMatrixRMaj B, DMatrixRMaj if (A.numRows != outputC.numRows || B.numRows != outputC.numCols) throw new MatrixDimensionException("Inconsistent matrix shapes. " + stringShapes(A, B, outputC)); - ImplSparseSparseMult_DSCC.multAddTransB(A, B, outputC); + ImplMultiplication_DSCC.multAddTransB(A, B, outputC); } /** @@ -252,7 +252,7 @@ public static DMatrixRMaj multTransAB( DMatrixSparseCSC A, DMatrixRMaj B, DMatri throw new MatrixDimensionException("Inconsistent matrix shapes. " + stringShapes(A, B)); outputC = reshapeOrDeclare(outputC, A.numCols, B.numRows); - ImplSparseSparseMult_DSCC.multTransAB(A, B, outputC); + ImplMultiplication_DSCC.multTransAB(A, B, outputC); return outputC; } @@ -266,7 +266,7 @@ public static void multAddTransAB( DMatrixSparseCSC A, DMatrixRMaj B, DMatrixRMa if (A.numCols != outputC.numRows || B.numRows != outputC.numCols) throw new MatrixDimensionException("Inconsistent matrix shapes. " + stringShapes(A, B, outputC)); - ImplSparseSparseMult_DSCC.multAddTransAB(A, B, outputC); + ImplMultiplication_DSCC.multAddTransAB(A, B, outputC); } /** @@ -1505,7 +1505,7 @@ public static void zero( DMatrixSparseCSC A, int row0, int row1, int col0, int c */ public static double dotInnerColumns( DMatrixSparseCSC A, int colA, DMatrixSparseCSC B, int colB, @Nullable IGrowArray gw, @Nullable DGrowArray gx ) { - return ImplSparseSparseMult_DSCC.dotInnerColumns(A, colA, B, colB, gw, gx); + return ImplMultiplication_DSCC.dotInnerColumns(A, colA, B, colB, gw, gx); } /** diff --git a/main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_MT_DSCC.java b/main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_MT_DSCC.java index cfb0b59e6..e41befed9 100644 --- a/main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_MT_DSCC.java +++ b/main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_MT_DSCC.java @@ -23,7 +23,7 @@ import org.ejml.data.DMatrixRMaj; import org.ejml.data.DMatrixSparseCSC; import org.ejml.sparse.csc.misc.ImplCommonOps_MT_DSCC; -import org.ejml.sparse.csc.mult.ImplSparseSparseMult_MT_DSCC; +import org.ejml.sparse.csc.mult.ImplMultiplication_MT_DSCC; import org.ejml.sparse.csc.mult.Workspace_MT_DSCC; import org.jetbrains.annotations.Nullable; import pabeles.concurrency.GrowArray; @@ -56,7 +56,7 @@ public static DMatrixSparseCSC mult( DMatrixSparseCSC A, DMatrixSparseCSC B, @Nu throw new MatrixDimensionException("Inconsistent matrix shapes. " + stringShapes(A, B)); outputC = reshapeOrDeclare(outputC, A, A.numRows, B.numCols); - ImplSparseSparseMult_MT_DSCC.mult(A, B, outputC, listWork); + ImplMultiplication_MT_DSCC.mult(A, B, outputC, listWork); return outputC; } @@ -98,7 +98,7 @@ public static DMatrixRMaj mult( DMatrixSparseCSC A, DMatrixRMaj B, @Nullable DMa throw new MatrixDimensionException("Inconsistent matrix shapes. " + stringShapes(A, B)); outputC = reshapeOrDeclare(outputC, A.numRows, B.numCols); - ImplSparseSparseMult_MT_DSCC.mult(A, B, outputC, listWork); + ImplMultiplication_MT_DSCC.mult(A, B, outputC, listWork); return outputC; } @@ -113,7 +113,7 @@ public static void multAdd( DMatrixSparseCSC A, DMatrixRMaj B, DMatrixRMaj outpu if (A.numRows != outputC.numRows || B.numCols != outputC.numCols) throw new MatrixDimensionException("Inconsistent matrix shapes. " + stringShapes(A, B, outputC)); - ImplSparseSparseMult_MT_DSCC.multAdd(A, B, outputC, listWork); + ImplMultiplication_MT_DSCC.multAdd(A, B, outputC, listWork); } /** @@ -129,7 +129,7 @@ public static DMatrixRMaj multTransA( DMatrixSparseCSC A, DMatrixRMaj B, @Nullab outputC = reshapeOrDeclare(outputC, A.numCols, B.numCols); - ImplSparseSparseMult_MT_DSCC.multTransA(A, B, outputC); + ImplMultiplication_MT_DSCC.multTransA(A, B, outputC); return outputC; } @@ -143,7 +143,7 @@ public static void multAddTransA( DMatrixSparseCSC A, DMatrixRMaj B, DMatrixRMaj if (A.numCols != outputC.numRows || B.numCols != outputC.numCols) throw new MatrixDimensionException("Inconsistent matrix shapes. " + stringShapes(A, B, outputC)); - ImplSparseSparseMult_MT_DSCC.multAddTransA(A, B, outputC); + ImplMultiplication_MT_DSCC.multAddTransA(A, B, outputC); } /** @@ -159,7 +159,7 @@ public static DMatrixRMaj multTransB( DMatrixSparseCSC A, DMatrixRMaj B, @Nullab throw new MatrixDimensionException("Inconsistent matrix shapes. " + stringShapes(A, B)); outputC = reshapeOrDeclare(outputC, A.numRows, B.numRows); - ImplSparseSparseMult_MT_DSCC.multTransB(A, B, outputC, listWork); + ImplMultiplication_MT_DSCC.multTransB(A, B, outputC, listWork); return outputC; } @@ -174,6 +174,6 @@ public static void multAddTransB( DMatrixSparseCSC A, DMatrixRMaj B, DMatrixRMaj if (A.numRows != outputC.numRows || B.numRows != outputC.numCols) throw new MatrixDimensionException("Inconsistent matrix shapes. " + stringShapes(A, B, outputC)); - ImplSparseSparseMult_MT_DSCC.multAddTransB(A, B, outputC, listWork); + ImplMultiplication_MT_DSCC.multAddTransB(A, B, outputC, listWork); } } diff --git a/main/ejml-dsparse/src/org/ejml/sparse/csc/decomposition/qr/QrLeftLookingDecomposition_DSCC.java b/main/ejml-dsparse/src/org/ejml/sparse/csc/decomposition/qr/QrLeftLookingDecomposition_DSCC.java index de4d7a64c..24528159b 100644 --- a/main/ejml-dsparse/src/org/ejml/sparse/csc/decomposition/qr/QrLeftLookingDecomposition_DSCC.java +++ b/main/ejml-dsparse/src/org/ejml/sparse/csc/decomposition/qr/QrLeftLookingDecomposition_DSCC.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2020, Peter Abeles. All Rights Reserved. + * Copyright (c) 2020, Peter Abeles. All Rights Reserved. * * This file is part of Efficient Java Matrix Library (EJML). * @@ -27,7 +27,7 @@ import org.ejml.sparse.ComputePermutation; import org.ejml.sparse.csc.CommonOps_DSCC; import org.ejml.sparse.csc.misc.ApplyFillReductionPermutation_DSCC; -import org.ejml.sparse.csc.mult.ImplSparseSparseMult_DSCC; +import org.ejml.sparse.csc.mult.ImplMultiplication_DSCC; import org.jetbrains.annotations.Nullable; import java.util.Arrays; @@ -150,7 +150,7 @@ private void performDecomposition( DMatrixSparseCSC A ) { R.nz_values[R.nz_length++] = x[i]; x[i] = 0; if (parent[i] == k) { - ImplSparseSparseMult_DSCC.addRowsInAInToC(V, i, V, k, w); + ImplMultiplication_DSCC.addRowsInAInToC(V, i, V, k, w); } } for (int p = p1; p < V.nz_length; p++) { diff --git a/main/ejml-dsparse/src/org/ejml/sparse/csc/misc/ImplCommonOpsWithSemiRing_DSCC.java b/main/ejml-dsparse/src/org/ejml/sparse/csc/misc/ImplCommonOpsWithSemiRing_DSCC.java index 1b60ef8a2..e960b87ec 100644 --- a/main/ejml-dsparse/src/org/ejml/sparse/csc/misc/ImplCommonOpsWithSemiRing_DSCC.java +++ b/main/ejml-dsparse/src/org/ejml/sparse/csc/misc/ImplCommonOpsWithSemiRing_DSCC.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2020, Peter Abeles. All Rights Reserved. + * Copyright (c) 2020, Peter Abeles. All Rights Reserved. * * This file is part of Efficient Java Matrix Library (EJML). * @@ -27,7 +27,7 @@ import java.util.Arrays; import static org.ejml.UtilEjml.adjust; -import static org.ejml.sparse.csc.mult.ImplSparseSparseMultWithSemiRing_DSCC.multAddColA; +import static org.ejml.sparse.csc.mult.ImplMultiplicationWithSemiRing_DSCC.multAddColA; /** * based on ImplCommonOps_DSCC diff --git a/main/ejml-dsparse/src/org/ejml/sparse/csc/misc/ImplCommonOps_DSCC.java b/main/ejml-dsparse/src/org/ejml/sparse/csc/misc/ImplCommonOps_DSCC.java index b8a960582..51db02250 100644 --- a/main/ejml-dsparse/src/org/ejml/sparse/csc/misc/ImplCommonOps_DSCC.java +++ b/main/ejml-dsparse/src/org/ejml/sparse/csc/misc/ImplCommonOps_DSCC.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2020, Peter Abeles. All Rights Reserved. + * Copyright (c) 2020, Peter Abeles. All Rights Reserved. * * This file is part of Efficient Java Matrix Library (EJML). * @@ -28,7 +28,7 @@ import java.util.Arrays; import static org.ejml.UtilEjml.adjust; -import static org.ejml.sparse.csc.mult.ImplSparseSparseMult_DSCC.multAddColA; +import static org.ejml.sparse.csc.mult.ImplMultiplication_DSCC.multAddColA; /** * Implementation class. Not recommended for direct use. Instead use {@link CommonOps_DSCC} diff --git a/main/ejml-dsparse/src/org/ejml/sparse/csc/misc/ImplCommonOps_MT_DSCC.java b/main/ejml-dsparse/src/org/ejml/sparse/csc/misc/ImplCommonOps_MT_DSCC.java index 1cbae1559..ecabfc271 100644 --- a/main/ejml-dsparse/src/org/ejml/sparse/csc/misc/ImplCommonOps_MT_DSCC.java +++ b/main/ejml-dsparse/src/org/ejml/sparse/csc/misc/ImplCommonOps_MT_DSCC.java @@ -25,8 +25,8 @@ import pabeles.concurrency.GrowArray; import static org.ejml.UtilEjml.adjust; -import static org.ejml.sparse.csc.mult.ImplSparseSparseMult_DSCC.multAddColA; -import static org.ejml.sparse.csc.mult.ImplSparseSparseMult_MT_DSCC.stitchMatrix; +import static org.ejml.sparse.csc.mult.ImplMultiplication_DSCC.multAddColA; +import static org.ejml.sparse.csc.mult.ImplMultiplication_MT_DSCC.stitchMatrix; /** * Concurrent implementations of {@link ImplCommonOps_DSCC}. diff --git a/main/ejml-dsparse/src/org/ejml/sparse/csc/mult/ImplSparseSparseMultWithSemiRing_DSCC.java b/main/ejml-dsparse/src/org/ejml/sparse/csc/mult/ImplMultiplicationWithSemiRing_DSCC.java similarity index 98% rename from main/ejml-dsparse/src/org/ejml/sparse/csc/mult/ImplSparseSparseMultWithSemiRing_DSCC.java rename to main/ejml-dsparse/src/org/ejml/sparse/csc/mult/ImplMultiplicationWithSemiRing_DSCC.java index 3ad01e9c7..06c7d42cb 100644 --- a/main/ejml-dsparse/src/org/ejml/sparse/csc/mult/ImplSparseSparseMultWithSemiRing_DSCC.java +++ b/main/ejml-dsparse/src/org/ejml/sparse/csc/mult/ImplMultiplicationWithSemiRing_DSCC.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2020, Peter Abeles. All Rights Reserved. + * Copyright (c) 2020, Peter Abeles. All Rights Reserved. * * This file is part of Efficient Java Matrix Library (EJML). * @@ -30,7 +30,7 @@ /** * based on ImplSparseSparseGraphMult_DSCC */ -public class ImplSparseSparseMultWithSemiRing_DSCC { +public class ImplMultiplicationWithSemiRing_DSCC { /** * Performs matrix multiplication. C = A*B diff --git a/main/ejml-dsparse/src/org/ejml/sparse/csc/mult/ImplSparseSparseMult_DSCC.java b/main/ejml-dsparse/src/org/ejml/sparse/csc/mult/ImplMultiplication_DSCC.java similarity index 98% rename from main/ejml-dsparse/src/org/ejml/sparse/csc/mult/ImplSparseSparseMult_DSCC.java rename to main/ejml-dsparse/src/org/ejml/sparse/csc/mult/ImplMultiplication_DSCC.java index 7aee77098..9971a4a54 100644 --- a/main/ejml-dsparse/src/org/ejml/sparse/csc/mult/ImplSparseSparseMult_DSCC.java +++ b/main/ejml-dsparse/src/org/ejml/sparse/csc/mult/ImplMultiplication_DSCC.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2020, Peter Abeles. All Rights Reserved. + * Copyright (c) 2020, Peter Abeles. All Rights Reserved. * * This file is part of Efficient Java Matrix Library (EJML). * @@ -31,7 +31,7 @@ /** * @author Peter Abeles */ -public class ImplSparseSparseMult_DSCC { +public class ImplMultiplication_DSCC { /** * Performs matrix multiplication. C = A*B diff --git a/main/ejml-dsparse/src/org/ejml/sparse/csc/mult/ImplSparseSparseMult_MT_DSCC.java b/main/ejml-dsparse/src/org/ejml/sparse/csc/mult/ImplMultiplication_MT_DSCC.java similarity index 98% rename from main/ejml-dsparse/src/org/ejml/sparse/csc/mult/ImplSparseSparseMult_MT_DSCC.java rename to main/ejml-dsparse/src/org/ejml/sparse/csc/mult/ImplMultiplication_MT_DSCC.java index 2b41d37f0..f319530ca 100644 --- a/main/ejml-dsparse/src/org/ejml/sparse/csc/mult/ImplSparseSparseMult_MT_DSCC.java +++ b/main/ejml-dsparse/src/org/ejml/sparse/csc/mult/ImplMultiplication_MT_DSCC.java @@ -29,14 +29,14 @@ import java.util.Arrays; import static org.ejml.UtilEjml.adjust; -import static org.ejml.sparse.csc.mult.ImplSparseSparseMult_DSCC.multAddColA; +import static org.ejml.sparse.csc.mult.ImplMultiplication_DSCC.multAddColA; /** * Concurrent matrix multiplication for DSCC matrices. * * @author Peter Abeles */ -public class ImplSparseSparseMult_MT_DSCC { +public class ImplMultiplication_MT_DSCC { /** * Performs matrix multiplication. C = A*B. The problem is broken up into as many "blocks" as there are threads * available. Each block will process a set of columns independently. After running results from independent diff --git a/main/ejml-dsparse/test/org/ejml/sparse/csc/TestCommonOps_DSCC.java b/main/ejml-dsparse/test/org/ejml/sparse/csc/TestCommonOps_DSCC.java index 2bb6a4df2..de67fe756 100644 --- a/main/ejml-dsparse/test/org/ejml/sparse/csc/TestCommonOps_DSCC.java +++ b/main/ejml-dsparse/test/org/ejml/sparse/csc/TestCommonOps_DSCC.java @@ -29,7 +29,7 @@ import org.ejml.ops.DConvertMatrixStruct; import org.ejml.ops.DOperatorBinaryIdx; import org.ejml.sparse.csc.mult.CheckMatrixMultShape_DSCC; -import org.ejml.sparse.csc.mult.ImplSparseSparseMult_DSCC; +import org.ejml.sparse.csc.mult.ImplMultiplication_DSCC; import org.ejml.sparse.triplet.RandomMatrices_DSTL; import org.junit.jupiter.api.Test; @@ -1262,7 +1262,7 @@ public void dotInnerColumns() { DMatrixSparseCSC B = RandomMatrices_DSCC.rectangle(8, 6, 30, rand); double found = CommonOps_DSCC.dotInnerColumns(A, 1, B, 3, null, null); - double expected = ImplSparseSparseMult_DSCC.dotInnerColumns(A, 1, B, 3, null, null); + double expected = ImplMultiplication_DSCC.dotInnerColumns(A, 1, B, 3, null, null); assertEquals(expected, found, UtilEjml.TEST_F64); } diff --git a/main/ejml-dsparse/test/org/ejml/sparse/csc/mult/TestImplSparseSparseMult_DSCC.java b/main/ejml-dsparse/test/org/ejml/sparse/csc/mult/TestImplMultiplication_DSCC.java similarity index 92% rename from main/ejml-dsparse/test/org/ejml/sparse/csc/mult/TestImplSparseSparseMult_DSCC.java rename to main/ejml-dsparse/test/org/ejml/sparse/csc/mult/TestImplMultiplication_DSCC.java index 4baffef64..ce47cc2e6 100644 --- a/main/ejml-dsparse/test/org/ejml/sparse/csc/mult/TestImplSparseSparseMult_DSCC.java +++ b/main/ejml-dsparse/test/org/ejml/sparse/csc/mult/TestImplMultiplication_DSCC.java @@ -38,7 +38,7 @@ /** * @author Peter Abeles */ -public class TestImplSparseSparseMult_DSCC { +public class TestImplMultiplication_DSCC { Random rand = new Random(234); @@ -60,7 +60,7 @@ private void mult_s_s( int rowsA, int colsA, int colsB ) { DMatrixSparseCSC b = RandomMatrices_DSCC.rectangle(colsA, colsB, nz_b, -1, 1, rand); DMatrixSparseCSC c = RandomMatrices_DSCC.rectangle(rowsA, colsB, nz_c, -1, 1, rand); - ImplSparseSparseMult_DSCC.mult(a, b, c, null, null); + ImplMultiplication_DSCC.mult(a, b, c, null, null); assertTrue(CommonOps_DSCC.checkStructure(c)); DMatrixRMaj dense_a = DConvertMatrixStruct.convert(a, (DMatrixRMaj)null); @@ -84,7 +84,7 @@ private void mult_s_s( int rowsA, int colsA, int colsB ) { DMatrixSparseCSC b = RandomMatrices_DSCC.rectangle(6, 5, 15, -1, 1, rand); DMatrixSparseCSC c = new DMatrixSparseCSC(4, 5, 0); - ImplSparseSparseMult_DSCC.mult(a, b, c, null, null); + ImplMultiplication_DSCC.mult(a, b, c, null, null); assertTrue(CommonOps_DSCC.checkStructure(c)); DMatrixRMaj dense_a = DConvertMatrixStruct.convert(a, (DMatrixRMaj)null); @@ -119,10 +119,10 @@ private void mult_s_d( int elementsA, boolean add ) { DMatrixRMaj dense_a = DConvertMatrixStruct.convert(a, (DMatrixRMaj)null); if (add) { - ImplSparseSparseMult_DSCC.multAdd(a, b, c); + ImplMultiplication_DSCC.multAdd(a, b, c); CommonOps_DDRM.multAdd(dense_a, b, expected_c); } else { - ImplSparseSparseMult_DSCC.mult(a, b, c); + ImplMultiplication_DSCC.mult(a, b, c); CommonOps_DDRM.mult(dense_a, b, expected_c); } @@ -153,10 +153,10 @@ private void multTransA_s_d( int elementsA, boolean add ) { DMatrixRMaj dense_a = DConvertMatrixStruct.convert(a, (DMatrixRMaj)null); if (add) { - ImplSparseSparseMult_DSCC.multAddTransA(a, b, c); + ImplMultiplication_DSCC.multAddTransA(a, b, c); CommonOps_DDRM.multAddTransA(dense_a, b, expected_c); } else { - ImplSparseSparseMult_DSCC.multTransA(a, b, c); + ImplMultiplication_DSCC.multTransA(a, b, c); CommonOps_DDRM.multTransA(dense_a, b, expected_c); } for (int row = 0; row < c.numRows; row++) { @@ -186,10 +186,10 @@ private void multTransB_s_d( int elementsA, boolean add ) { DMatrixRMaj dense_a = DConvertMatrixStruct.convert(a, (DMatrixRMaj)null); if (add) { - ImplSparseSparseMult_DSCC.multAddTransB(a, b, c); + ImplMultiplication_DSCC.multAddTransB(a, b, c); CommonOps_DDRM.multAddTransB(dense_a, b, expected_c); } else { - ImplSparseSparseMult_DSCC.multTransB(a, b, c); + ImplMultiplication_DSCC.multTransB(a, b, c); CommonOps_DDRM.multTransB(dense_a, b, expected_c); } for (int row = 0; row < c.numRows; row++) { @@ -219,10 +219,10 @@ private void multTransAB_s_d( int elementsA, boolean add ) { DMatrixRMaj dense_a = DConvertMatrixStruct.convert(a, (DMatrixRMaj)null); if (add) { - ImplSparseSparseMult_DSCC.multAddTransAB(a, b, c); + ImplMultiplication_DSCC.multAddTransAB(a, b, c); CommonOps_DDRM.multAddTransAB(dense_a, b, expected_c); } else { - ImplSparseSparseMult_DSCC.multTransAB(a, b, c); + ImplMultiplication_DSCC.multTransAB(a, b, c); CommonOps_DDRM.multTransAB(dense_a, b, expected_c); } @@ -247,11 +247,11 @@ private void multTransAB_s_d( int elementsA, boolean add ) { B.nz_length = 0; // nothing should be added here since w is full of 0 and colC = 0 - ImplSparseSparseMult_DSCC.addRowsInAInToC(A, 0, B, 0, w); + ImplMultiplication_DSCC.addRowsInAInToC(A, 0, B, 0, w); assertEquals(0, B.col_idx[1]); // colA shoul dnow be added to colB - ImplSparseSparseMult_DSCC.addRowsInAInToC(A, 0, B, 1, w); + ImplMultiplication_DSCC.addRowsInAInToC(A, 0, B, 1, w); B.numCols = 2;// needed to be set correctly for structure unit test assertTrue(CommonOps_DSCC.checkStructure(B)); assertEquals(3, B.col_idx[2]); @@ -276,7 +276,7 @@ private void multTransAB_s_d( int elementsA, boolean add ) { int colA = rand.nextInt(4); int colB = rand.nextInt(6); - double found = ImplSparseSparseMult_DSCC.dotInnerColumns(A, colA, B, colB, gw, gx); + double found = ImplMultiplication_DSCC.dotInnerColumns(A, colA, B, colB, gw, gx); double expected = 0; for (int i = 0; i < 8; i++) { diff --git a/main/ejml-dsparse/test/org/ejml/sparse/csc/mult/TestImplSparseSparseMult_MT_DSCC.java b/main/ejml-dsparse/test/org/ejml/sparse/csc/mult/TestImplMultiplication_MT_DSCC.java similarity index 91% rename from main/ejml-dsparse/test/org/ejml/sparse/csc/mult/TestImplSparseSparseMult_MT_DSCC.java rename to main/ejml-dsparse/test/org/ejml/sparse/csc/mult/TestImplMultiplication_MT_DSCC.java index d9840115a..b39ccab67 100644 --- a/main/ejml-dsparse/test/org/ejml/sparse/csc/mult/TestImplSparseSparseMult_MT_DSCC.java +++ b/main/ejml-dsparse/test/org/ejml/sparse/csc/mult/TestImplMultiplication_MT_DSCC.java @@ -40,7 +40,7 @@ /** * @author Peter Abeles */ -class TestImplSparseSparseMult_MT_DSCC { +class TestImplMultiplication_MT_DSCC { Random rand = new Random(234); @Test void mult_s_s() { @@ -62,8 +62,8 @@ private void mult_s_s( int rowsA, int colsA, int colsB ) { DMatrixSparseCSC expected = RandomMatrices_DSCC.rectangle(rowsA, colsB, nz_c, -1, 1, rand); DMatrixSparseCSC found = expected.copy(); - ImplSparseSparseMult_DSCC.mult(a, b, expected, null, null); - ImplSparseSparseMult_MT_DSCC.mult(a, b, found, null); + ImplMultiplication_DSCC.mult(a, b, expected, null, null); + ImplMultiplication_MT_DSCC.mult(a, b, found, null); assertTrue(CommonOps_DSCC.checkStructure(found)); assertTrue(MatrixFeatures_DSCC.isEqualsSort(expected, found, UtilEjml.TEST_F64)); @@ -90,10 +90,10 @@ private void mult_s_d( int elementsA, boolean add ) { GrowArray work = new GrowArray<>(DGrowArray::new); if (add) { - ImplSparseSparseMult_MT_DSCC.multAdd(a, b, c, work); + ImplMultiplication_MT_DSCC.multAdd(a, b, c, work); CommonOps_DDRM.multAdd(dense_a, b, expected_c); } else { - ImplSparseSparseMult_MT_DSCC.mult(a, b, c, work); + ImplMultiplication_MT_DSCC.mult(a, b, c, work); CommonOps_DDRM.mult(dense_a, b, expected_c); } @@ -119,8 +119,8 @@ private void multTransA_s_d( int rowsA, int colsA, int colsB ) { DMatrixRMaj expected = RandomMatrices_DDRM.rectangle(rowsA, colsB, -1, 1, rand); DMatrixRMaj found = expected.copy(); - ImplSparseSparseMult_DSCC.multTransA(a, b, expected); - ImplSparseSparseMult_MT_DSCC.multTransA(a, b, found); + ImplMultiplication_DSCC.multTransA(a, b, expected); + ImplMultiplication_MT_DSCC.multTransA(a, b, found); assertTrue(MatrixFeatures_DDRM.isEquals(expected, found, UtilEjml.TEST_F64)); } @@ -140,8 +140,8 @@ private void multAddTransA_s_d( int rowsA, int colsA, int colsB ) { DMatrixRMaj expected = RandomMatrices_DDRM.rectangle(rowsA, colsB, -1, 1, rand); DMatrixRMaj found = expected.copy(); - ImplSparseSparseMult_DSCC.multAddTransA(a, b, expected); - ImplSparseSparseMult_MT_DSCC.multAddTransA(a, b, found); + ImplMultiplication_DSCC.multAddTransA(a, b, expected); + ImplMultiplication_MT_DSCC.multAddTransA(a, b, found); assertTrue(MatrixFeatures_DDRM.isEquals(expected, found, UtilEjml.TEST_F64)); } @@ -171,7 +171,7 @@ private void multTransB_s_d( int elementsA, boolean add ) { // ImplSparseSparseMult_MT_DSCC.multAddTransB(a, b, c); CommonOps_DDRM.multAddTransB(dense_a, b, expected_c); } else { - ImplSparseSparseMult_MT_DSCC.multTransB(a, b, c, false, work); + ImplMultiplication_MT_DSCC.multTransB(a, b, c, false, work); CommonOps_DDRM.multTransB(dense_a, b, expected_c); } for (int row = 0; row < c.numRows; row++) {