Click or drag to resize

ComplexMatrixConjugate Method

Returns the conjugate of this instance.

Namespace:  Novacta.Analytics
Assembly:  Novacta.Analytics (in Novacta.Analytics.dll) Version: 2.0.0
Syntax
public ComplexMatrix Conjugate()

Return Value

Type: ComplexMatrix
The conjugate of this instance.
Remarks

Let LaTeX equation and LaTeX equation be the number of rows and columns, respectively, of this instance, and consider its generic entry

LaTeX equation

The method returns the conjugate of this instance, i.e. a matrix, say LaTeX equation, having LaTeX equation rows and LaTeX equation columns, whose generic entry is:

LaTeX equation

where LaTeX equation is the conjugate of complex LaTeX equation.

Examples

In the following example, the conjugate of a matrix is computed.

C#
using System;
using System.Numerics;

namespace Novacta.Analytics.CodeExamples
{
    public class ComplexOutPlaceConjugateExample0  
    {
        public void Main()
        {
            // Create a matrix.
            var data = new Complex[6] {
                new Complex(1, -1), new Complex(5, -5),
                new Complex(2, -2), new Complex(6, -6),
                new Complex(3, -3), new Complex(7, -7)
            };
            var matrix = ComplexMatrix.Dense(3, 2, data, StorageOrder.RowMajor);
            Console.WriteLine("The data matrix:");
            Console.WriteLine(matrix);

            // Return its conjugate.
            var transposedMatrix = matrix.Conjugate();

            Console.WriteLine();
            Console.WriteLine("Conjugate matrix:");
            Console.WriteLine(transposedMatrix);

            // Compute the conjugate using a read-only wrapper
            // of the data matrix.
            ReadOnlyComplexMatrix readOnlyMatrix = matrix.AsReadOnly();
            var transposedReadOnlyMatrix = readOnlyMatrix.Conjugate();

            Console.WriteLine();
            Console.WriteLine("Read only matrix conjugate:");
            Console.WriteLine(transposedReadOnlyMatrix);
        }
    }
}

// Executing method Main() produces the following output:
// 
// The data matrix:
// (                1,               -1) (                5,               -5) 
// (                2,               -2) (                6,               -6) 
// (                3,               -3) (                7,               -7) 
// 
// 
// 
// Conjugate matrix:
// (                1,                1) (                5,                5) 
// (                2,                2) (                6,                6) 
// (                3,                3) (                7,                7) 
// 
// 
// 
// Read only matrix conjugate:
// (                1,                1) (                5,                5) 
// (                2,                2) (                6,                6) 
// (                3,                3) (                7,                7) 
// 

See Also