public Mobius(ComplexMatrixNxM M, int R = 1) { Debug.Assert(M != null); Debug.Assert(M.cols == 2 && M.rows == 2); this.M = M; this.R = R; }
public Mobius(Complex a, Complex b, Complex c, Complex d, int R = 1) { M = new ComplexMatrixNxM(new Complex[, ] { { a, b }, { c, d } }); this.R = R; }
public static ComplexMatrixNxM Transpose(ComplexMatrixNxM a) { ComplexMatrixNxM c = new ComplexMatrixNxM(a.cols, a.rows); for (int i = 0; i < a.rows; ++i) { for (int j = 0; j < a.cols; ++j) { c[j, i] = a[i, j]; } } return(c); }
public static ComplexMatrixNxM CopyMatrix(ComplexMatrixNxM a) { ComplexMatrixNxM c = new ComplexMatrixNxM(a.rows, a.cols); for (int i = 0; i < a.rows; ++i) { for (int j = 0; j < a.cols; ++j) { c[i, j] = a[i, j]; } } return(c); }
public static ComplexMatrixNxM operator *(ComplexMatrixNxM a, Complex b) { ComplexMatrixNxM c = new ComplexMatrixNxM(a.rows, a.cols); for (int i = 0; i < a.rows; ++i) { for (int j = 0; j < a.cols; ++j) { c[i, j] = a[i, j] * b; } } return(c); }
public static ComplexMatrixNxM operator +(ComplexMatrixNxM a, ComplexMatrixNxM b) { Debug.Assert(a.rows == b.rows && a.cols == b.cols); ComplexMatrixNxM c = new ComplexMatrixNxM(a.rows, a.cols); for (int i = 0; i < a.rows; ++i) { for (int j = 0; j < a.cols; ++j) { c[i, j] = a[i, j] + b[i, j]; } } return(c); }
public static ComplexMatrixNxM operator *(ComplexMatrixNxM a, ComplexMatrixNxM b) { Debug.Assert(a.cols == b.rows); ComplexMatrixNxM c = new ComplexMatrixNxM(a.rows, b.cols); c.ZeroMatrix(); for (int i = 0; i < a.rows; ++i) { for (int j = 0; j < b.cols; ++j) { for (int k = 0; k < a.cols; ++k) { c[i, j] += a[i, k] * b[k, j]; } } } return(c); }
public ComplexMatrixNxM Transpose() { return(ComplexMatrixNxM.Transpose(this)); }
public ComplexMatrixNxM CopyMatrix() { return(ComplexMatrixNxM.CopyMatrix(this)); }