Example #1
0
        public static void multTransA(FMatrixRBlock A, FMatrixRBlock B, FMatrixRBlock C)
        {
            if (A.numRows != B.numRows)
            {
                throw new ArgumentException("Rows in A are incompatible with rows in B");
            }
            if (A.numCols != C.numRows)
            {
                throw new ArgumentException("Columns in A are incompatible with rows in C");
            }
            if (B.numCols != C.numCols)
            {
                throw new ArgumentException("Columns in B are incompatible with columns in C");
            }
            if (A.blockLength != B.blockLength || A.blockLength != C.blockLength)
            {
                throw new ArgumentException("Block lengths are not all the same.");
            }

            int blockLength = A.blockLength;

            FSubmatrixD1 Asub = new FSubmatrixD1(A, 0, A.numRows, 0, A.numCols);
            FSubmatrixD1 Bsub = new FSubmatrixD1(B, 0, B.numRows, 0, B.numCols);
            FSubmatrixD1 Csub = new FSubmatrixD1(C, 0, C.numRows, 0, C.numCols);

            MatrixMult_FDRB.multTransA(blockLength, Asub, Bsub, Csub);
        }