Exemplo n.º 1
0
 mat operator-(mat b) {
   mat res;
   for(int i(0);i!=MAX;++i)
     for(int j(0);j!=MAX;++j)
       res.get(i,j) = get(i,j)-b.get(i,j);
   return res;
 }
Exemplo n.º 2
0
 mat operator*(mat b) {
   mat res;
   for(int i(0);i!=MAX;++i)
     for(int j(0);j!=MAX;++j)
       for(int k(0);k!=MAX;++k)
         res.get(i,j)+=get(i,k)*b.get(k,j);
   return res;
 }