public ComplexMatrix(OrderedPair size)
 {
     var matrix = new ComplexVector[size.M];
     for (var i = 0; i < size.M; i++)
     {
         matrix[i] = new ComplexVector(size.N);
     }
     this.matrix = matrix;
 }
Exemple #2
0
        public ComplexMatrix(OrderedPair size)
        {
            var matrix = new ComplexVector[size.M];

            for (var i = 0; i < size.M; i++)
            {
                matrix[i] = new ComplexVector(size.N);
            }
            this.matrix = matrix;
        }
Exemple #3
0
        public static ComplexMatrix TensorProduct(ComplexMatrix m1, ComplexMatrix m2)
        {
            var size   = new OrderedPair(m1.Size.M * m2.Size.M, m1.Size.N * m2.Size.N);
            var result = new ComplexMatrix(size);

            for (var m = 0; m < size.M; m++)
            {
                for (var n = 0; n < size.N; n++)
                {
                    result[m][n] = m1[m / m2.Size.M][n / m2.Size.N] * m2[m % m2.Size.M][n % m2.Size.N];
                }
            }

            return(result);
        }
        public static ComplexMatrix TensorProduct(ComplexMatrix m1, ComplexMatrix m2)
        {
            var size = new OrderedPair(m1.Size.M * m2.Size.M, m1.Size.N * m2.Size.N);
            var result = new ComplexMatrix(size);

            for (var m = 0; m < size.M; m++)
            {
                for (var n = 0; n < size.N; n++)
                {
                    result[m][n] = m1[m / m2.Size.M][n / m2.Size.N] * m2[m % m2.Size.M][n % m2.Size.N];
                }
            }

            return result;
        }