code: public static void multAdd(DMatrix1Row A , DMatrixD1 B , DMatrixD1 C )
      {
          if( B.numRows == 1 ) {
              if( A.numCols != B.numCols ) {
                  throw new MatrixDimensionException("A and B are not compatible");
              }
          } else if( B.numCols == 1 ) {
              if( A.numCols != B.numRows ) {
                  throw new MatrixDimensionException("A and B are not compatible");
              }
          } else {
              throw new MatrixDimensionException("B is not a vector");
          }
          C.reshape(A.numRows,1);
  
          if( A.numCols == 0 ) {
              return;
          }
  
          int indexA = 0;
          int cIndex = 0;
          for( int i = 0; i < A.numRows; i++ ) {
              double total = A.get(indexA++) * B.get(0);
  
              for( int j = 1; j < A.numCols; j++ ) {
                  total += A.get(indexA++) * B.get(j);
              }
  
              C.plus(cIndex++ , total );
          }
      }
docs: <p>
  Performs a matrix vector multiply.<br>
  <br>
  C = C + A * B <br>
  or<br>
  C = C + A * B<sup>T</sup> <br>
  <br>
  c<sub>i</sub> = Sum{ j=1:n, c<sub>i</sub> + a<sub>ij</sub> * b<sub>j</sub>}<br>
  <br>
  where A is a matrix, B is a column or transposed row vector, and C is a column vector.
  </p>
  
  @param A A matrix that is m by n. Not modified.
  @param B A vector that has length n. Not modified.
  @param C A column vector that has length m. Modified.