示例#1
0
        public static float innerProdRowSymm(int blockLength,
                                             FSubmatrixD1 A,
                                             int rowA,
                                             FSubmatrixD1 B,
                                             int rowB, int zeroOffset)
        {
            int offset = rowA + zeroOffset;

            if (offset + B.col0 >= B.col1)
            {
                return(0);
            }

            if (offset < rowB)
            {
                // take in account the one in 'A'
                float total = B.get(offset, rowB);

                total += VectorOps_FDRB.dot_row_col(blockLength, A, rowA, B, rowB, offset + 1, rowB);
                total += VectorOps_FDRB.dot_row(blockLength, A, rowA, B, rowB, rowB, A.col1 - A.col0);

                return(total);
            }
            else
            {
                // take in account the one in 'A'
                float total = B.get(rowB, offset);

                total += VectorOps_FDRB.dot_row(blockLength, A, rowA, B, rowB, offset + 1, A.col1 - A.col0);

                return(total);
            }
        }