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;
 }
Example #3
0
        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);
        }
Example #4
0
        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);
        }
Example #5
0
        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);
        }
Example #6
0
        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);
        }
Example #7
0
        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);
        }
Example #8
0
 public ComplexMatrixNxM Transpose()
 {
     return(ComplexMatrixNxM.Transpose(this));
 }
Example #9
0
 public ComplexMatrixNxM CopyMatrix()
 {
     return(ComplexMatrixNxM.CopyMatrix(this));
 }