Beispiel #1
0
 DenseMatrix DenseMatrix::operator * (const DenseMatrix& mat) const
 {
     int rightColNum = mat.GetColNum();
     DenseMatrix matRes(mRowNum, rightColNum, 0);
     for (int rid = 0; rid < mRowNum; rid++)
     {
         for (int cid = 0; cid < rightColNum; cid++)
         {
             double v = 0.0;
             int rBaseIndex = rid * mColNum;
             for (int did = 0; did < mColNum; did++)
             {
                 v += mValues.at(rBaseIndex + did) * mat.at(did, cid);
             }
             matRes.at(rid, cid) = v;
         }
     }
     return matRes;
 }