Exemple #1
0
 public MaTran(MaTran t2)
 {
     this.sh = t2.sh;
     this.sc = t2.sc;
     this.a  = new int[sh, sc];
     for (int i = 0; i < sh; i++)
     {
         for (int j = 0; j < sc; j++)
         {
             this.a[i, j] = t2.a[i, j];
         }
     }
 }
Exemple #2
0
 public MaTranHieu(MaTran t2)
 {
     if (this.sh == t2.sh && this.sc == t2.sc)
     {
         MaTran t = new MaTran(this.sh, this.sc);
         for (int i = 0; i < sh; i++)
         {
             for (int j = 0; j < sc; j++)
             {
                 t.a[i, j] = this.a[i, j] - t2.a[i, j];
             }
         }
         return(t);
     }
     else
     {
         return(null);
     }
 }