Beispiel #1
0
 public NComplex this[int row, int col]
 {
     get
     {
         //todo:
         return(new NComplex(_mat.getAt(row, col), _mat.getAtIm(row, col)));
     }
     set
     {
         _mat.setAt(row, col, value.Re, value.Im);
     }
 }
Beispiel #2
0
        public void PrintComplexMatrix(MCJCMatrix matrix)
        {
            int cols = matrix.cols();
            int rows = matrix.rows();

            for (int i = 0; i < rows; i++)
            {
                for (int j = 0; j < cols; j++)
                {
                    double re = matrix.getAt(i, j);
                    double im = matrix.getAtIm(i, j);

                    Console.Write("({0};{1})  ", re, im);
                }
                Console.WriteLine();
            }
        }
Beispiel #3
0
        public void PrintComplexMatrix(MCJCMatrix matrix)
        {
            int cols = matrix.cols();
            int rows = matrix.rows();

            for (int i = 0; i < rows; i++)
            {
                for (int j = 0; j < cols; j++)
                {
                    double re = matrix.getAt(i, j);
                    double im = matrix.getAtIm(i, j);

                    Console.Write("({0};{1})  ", re, im);
                }
                Console.WriteLine();
            }
        }