Beispiel #1
0
 public Matrix(int n, int d, T defaultValue)
 {
     init(n, d);
     MatrixExtensions.DoOperation(this, x => defaultValue, true);
 }
Beispiel #2
0
 public static Matrix <T> operator /(Matrix <T> a, T x)
 {
     return(MatrixExtensions.DoOperation(a, i => (dynamic)i / x));
 }
Beispiel #3
0
 public static Matrix <T> operator *(Matrix <T> a, Matrix <T> b)
 {
     return(MatrixExtensions.DoInnerOperation(a, b, (i, j) => (dynamic)i * j));
 }
Beispiel #4
0
 public static Matrix <T> operator *(T x, Matrix <T> a)
 {
     return(MatrixExtensions.DoOperation(a, i => (dynamic)i * x));
 }
Beispiel #5
0
 public static Matrix <T> operator -(Matrix <T> a, Matrix <T> b)
 {
     return(MatrixExtensions.DoOperation(a, b, (i, j) => (dynamic)i - j));
 }