예제 #1
0
 public MaTran(MaTran t2)
 {
     this.m = t2.m;
     this.n = t2.n;
     this.a = new int[m, n];
     for (int i = 0; i < m; ++i)
     {
         for (int j = 0; j < n; ++j)
         {
             this.a[i, j] = t2.a[i, j];
         }
     }
 }
예제 #2
0
 public MaTran Hieu(MaTran t2)
 {
     if (this.m == t2.m && this.n == t2.n)
     {
         MaTran t = new MaTran(this.m, this.n);
         for (int i = 0; i < t.m; ++i)
         {
             for (int j = 0; j < t.n; ++j)
             {
                 t.a[i, j] = this.a[i, j] - t2.a[i, j];
             }
         }
         return(t);
     }
     else
     {
         return(null);
     }
 }