Struct Complex

Struct Complex

Namespace: Aspose.Imaging.ImageFilters.ComplexUtils
Assembly: Aspose.Imaging.dll (25.4.0)

The complex number structure.

public struct Complex : IEquatable<complex>

Implements

IEquatable<complex>

Inherited Members

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors

Complex(double, double)

Initializes a new instance of the Aspose.Imaging.ImageFilters.ComplexUtils.Complex struct.

public Complex(double real, double imaginary)

Parameters

real double

The real part.

imaginary double

The imaginary part.

Complex(Complex)

Initializes a new instance of the Aspose.Imaging.ImageFilters.ComplexUtils.Complex struct.

public Complex(Complex c)

Parameters

c Complex

The complex number.

Fields

I

I complex having Aspose.Imaging.ImageFilters.ComplexUtils.Complex.Im equal to 1.

public static readonly Complex I

Field Value

Complex

One

One complex having Aspose.Imaging.ImageFilters.ComplexUtils.Complex.Re and Aspose.Imaging.ImageFilters.ComplexUtils.Complex.Im equal to 1.

public static readonly Complex One

Field Value

Complex

SizeOfComplex

The size of complex.

public static readonly int SizeOfComplex

Field Value

int

SizeOfDouble

The size of System.Double.

public static readonly int SizeOfDouble

Field Value

int

Zero

Zero complex.

public static readonly Complex Zero

Field Value

Complex

Properties

Im

Gets or sets the imaginary part.

public double Im { get; set; }

Property Value

double

Magnitude

Gets the magnitude.

public double Magnitude { get; }

Property Value

double

Phase

Gets the phase.

public double Phase { get; }

Property Value

double

Re

Gets or sets the real part.

public double Re { get; set; }

Property Value

double

SquaredMagnitude

Gets the squared magnitude.

public double SquaredMagnitude { get; }

Property Value

double

Methods

Add(Complex, Complex)

Adds a and b.

public static Complex Add(Complex a, Complex b)

Parameters

a Complex

The a complex.

b Complex

The b complex.

Returns

Complex

The sum complex.

Add(Complex, double)

Adds a and s.

public static Complex Add(Complex a, double s)

Parameters

a Complex

The a complex.

s double

The s value.

Returns

Complex

The complex with its Re increased by s.

Add(Complex, Complex, ref Complex)

Adds a and b.

public static void Add(Complex a, Complex b, ref Complex result)

Parameters

a Complex

The a complex.

b Complex

The b complex.

result Complex

The result.

Add(Complex, double, ref Complex)

Adds a and s.

public static void Add(Complex a, double s, ref Complex result)

Parameters

a Complex

The a complex.

s double

The s value.

result Complex

The result.

ApproxEqual(Complex, Complex)

Checks approximate equality.

public static bool ApproxEqual(Complex a, Complex b)

Parameters

a Complex

The a complex.

b Complex

The b complex.

Returns

bool

The approximate equality result.

ApproxEqual(Complex, Complex, double)

Checks approximate equality.

public static bool ApproxEqual(Complex a, Complex b, double tolerance)

Parameters

a Complex

The a complex.

b Complex

The b complex.

tolerance double

The tolerance.

Returns

bool

The approximate equality result.

Clone()

Clones this instance.

public Complex Clone()

Returns

Complex

A clone of this complex.

Cos(Complex)

Gets Cos of a.

public static Complex Cos(Complex a)

Parameters

a Complex

The a complex.

Returns

Complex

Cos of a.

Divide(Complex, Complex)

Divides a by b.

public static Complex Divide(Complex a, Complex b)

Parameters

a Complex

The a complex.

b Complex

The b complex.

Returns

Complex

The result of division.

Exceptions

DivideByZeroException

Can not divide by zero.

Divide(Complex, double)

Divides a by s.

public static Complex Divide(Complex a, double s)

Parameters

a Complex

The a complex.

s double

The s value.

Returns

Complex

The result of division.

Exceptions

DivideByZeroException

Can not divide by zero.

Divide(double, Complex)

Divides a by s.

public static Complex Divide(double s, Complex a)

Parameters

s double

The s value.

a Complex

The a complex.

Returns

Complex

The result of division.

Exceptions

DivideByZeroException

Can not divide by zero.

Divide(Complex, Complex, ref Complex)

Divides a by b.

public static void Divide(Complex a, Complex b, ref Complex result)

Parameters

a Complex

The a complex.

b Complex

The b complex.

result Complex

The result.

Exceptions

DivideByZeroException

Can not divide by zero.

Divide(Complex, double, ref Complex)

Divides a by s.

public static void Divide(Complex a, double s, ref Complex result)

Parameters

a Complex

The a complex.

s double

The s value.

result Complex

The result.

Exceptions

DivideByZeroException

Can not divide by zero.

Divide(double, Complex, ref Complex)

Divides s by a.

public static void Divide(double s, Complex a, ref Complex result)

Parameters

s double

The s value.

a Complex

The a complex.

result Complex

The result.

Exceptions

DivideByZeroException

Can not divide by zero.

Equals(object)

Determines whether the specified System.Object, is equal to this instance.

public override bool Equals(object obj)

Parameters

obj object

The System.Object to compare with this instance.

Returns

bool

true if the specified System.Object is equal to this instance; otherwise, false.

Equals(Complex)

Determines whether the specified System.Object, is equal to this instance.

public bool Equals(Complex other)

Parameters

other Complex

The System.Object to compare with this instance.

Returns

bool

true if the specified System.Object is equal to this instance; otherwise, false.

Exp(Complex)

Raises e by a.

public static Complex Exp(Complex a)

Parameters

a Complex

The a complex.

Returns

Complex

e raised by a.

GetHashCode()

Returns a hash code for this instance.

public override int GetHashCode()

Returns

int

A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

Log(Complex)

Gets log of a.

public static Complex Log(Complex a)

Parameters

a Complex

The a complex.

Returns

Complex

The log of a.

Multiply(Complex, Complex)

Multiplies a by b.

public static Complex Multiply(Complex a, Complex b)

Parameters

a Complex

The a complex.

b Complex

The b complex.

Returns

Complex

The result of multiplication.

Multiply(Complex, double)

Multiplies a by s.

public static Complex Multiply(Complex a, double s)

Parameters

a Complex

The a complex.

s double

The s value.

Returns

Complex

The result of multiplication.

Multiply(Complex, Complex, ref Complex)

Multiplies a by b.

public static void Multiply(Complex a, Complex b, ref Complex result)

Parameters

a Complex

The a complex.

b Complex

The b complex.

result Complex

The result.

Multiply(Complex, double, ref Complex)

Multiplies a by s.

public static void Multiply(Complex a, double s, ref Complex result)

Parameters

a Complex

The a complex.

s double

The s value.

result Complex

The result.

Negate(Complex)

Negates a.

public static Complex Negate(Complex a)

Parameters

a Complex

The a complex.

Returns

Complex

The result of negation.

Parse(string)

Parses the specified s into a Aspose.Imaging.ImageFilters.ComplexUtils.Complex.

public static Complex Parse(string s)

Parameters

s string

The s value.

Returns

Complex

The complex number.

Exceptions

FormatException

String representation of the complex number is not correctly formatted.

Sin(Complex)

Gets Sin of a.

public static Complex Sin(Complex a)

Parameters

a Complex

The a complex.

Returns

Complex

Sin of a.

Sqrt(Complex)

Gets square root of a.

public static Complex Sqrt(Complex a)

Parameters

a Complex

The a complex.

Returns

Complex

The square root.

Subtract(Complex, Complex)

Subtracts b from a.

public static Complex Subtract(Complex a, Complex b)

Parameters

a Complex

The a complex.

b Complex

The b complex.

Returns

Complex

The result of subtraction.

Subtract(Complex, double)

Subtracts s from a.

public static Complex Subtract(Complex a, double s)

Parameters

a Complex

The a complex.

s double

The s value.

Returns

Complex

The result of subtraction.

Subtract(double, Complex)

Subtracts s from a.

public static Complex Subtract(double s, Complex a)

Parameters

s double

The s value.

a Complex

The a complex.

Returns

Complex

The result of subtraction.

Subtract(Complex, Complex, ref Complex)

Subtracts b from a.

public static void Subtract(Complex a, Complex b, ref Complex result)

Parameters

a Complex

The a complex.

b Complex

The b complex.

result Complex

The result.

Subtract(Complex, double, ref Complex)

Subtracts s from a.

public static void Subtract(Complex a, double s, ref Complex result)

Parameters

a Complex

The a complex.

s double

The s value.

result Complex

The result.

Subtract(double, Complex, ref Complex)

Subtracts a from s.

public static void Subtract(double s, Complex a, ref Complex result)

Parameters

s double

The s value.

a Complex

The a complex.

result Complex

The result.

Tan(Complex)

Gets Tan of a.

public static Complex Tan(Complex a)

Parameters

a Complex

The a complex.

Returns

Complex

Tan of a.

ToString()

Returns a System.String that represents this instance.

public override string ToString()

Returns

string

A System.String that represents this instance.

TryParse(string, out Complex)

Tries to parse the specified s into a Aspose.Imaging.ImageFilters.ComplexUtils.Complex.

public static bool TryParse(string s, out Complex result)

Parameters

s string

The s value.

result Complex

The result.

Returns

bool

True, if the complex number is parsed.

Operators

operator +(Complex, Complex)

Implements the operator +.

public static Complex operator +(Complex a, Complex b)

Parameters

a Complex

The a complex.

b Complex

The b complex.

Returns

Complex

The result of the operator.

operator +(Complex, double)

Implements the operator +.

public static Complex operator +(Complex a, double s)

Parameters

a Complex

The a complex.

s double

The s value.

Returns

Complex

The result of the operator.

operator +(double, Complex)

Implements the operator +.

public static Complex operator +(double s, Complex a)

Parameters

s double

The s value.

a Complex

The a complex.

Returns

Complex

The result of the operator.

operator /(Complex, Complex)

Implements the operator /.

public static Complex operator /(Complex a, Complex b)

Parameters

a Complex

The a complex.

b Complex

The b complex.

Returns

Complex

The result of the operator.

operator /(Complex, double)

Implements the operator /.

public static Complex operator /(Complex a, double s)

Parameters

a Complex

The a complex.

s double

The s value.

Returns

Complex

The result of the operator.

operator /(double, Complex)

Implements the operator /.

public static Complex operator /(double s, Complex a)

Parameters

s double

The s value.

a Complex

The a complex.

Returns

Complex

The result of the operator.

operator ==(Complex, Complex)

Implements the operator ==.

public static bool operator ==(Complex a, Complex b)

Parameters

a Complex

The a complex.

b Complex

The b complex.

Returns

bool

The result of the operator.

explicit operator Complex(double)

Performs an explicit conversion from System.Double to Aspose.Imaging.ImageFilters.ComplexUtils.Complex.

public static explicit operator Complex(double value)

Parameters

value double

The value.

Returns

Complex

The result of the conversion.

explicit operator Complex(float)

Performs an explicit conversion from System.Single to Aspose.Imaging.ImageFilters.ComplexUtils.Complex.

public static explicit operator Complex(float value)

Parameters

value float

The value.

Returns

Complex

The result of the conversion.

operator !=(Complex, Complex)

Implements the operator !=.

public static bool operator !=(Complex a, Complex b)

Parameters

a Complex

The a complex.

b Complex

The b complex.

Returns

bool

The result of the operator.

operator *(Complex, Complex)

Implements the operator *.

public static Complex operator *(Complex a, Complex b)

Parameters

a Complex

The a complex.

b Complex

The b complex.

Returns

Complex

The result of the operator.

operator *(double, Complex)

Implements the operator *.

public static Complex operator *(double s, Complex a)

Parameters

s double

The s value.

a Complex

The a complex.

Returns

Complex

The result of the operator.

operator *(Complex, double)

Implements the operator *.

public static Complex operator *(Complex a, double s)

Parameters

a Complex

The a complex.

s double

The s value.

Returns

Complex

The result of the operator.

operator -(Complex, Complex)

Implements the operator -.

public static Complex operator -(Complex a, Complex b)

Parameters

a Complex

The a complex.

b Complex

The b complex.

Returns

Complex

The result of the operator.

operator -(Complex, double)

Implements the operator -.

public static Complex operator -(Complex a, double s)

Parameters

a Complex

The a complex.

s double

The s value.

Returns

Complex

The result of the operator.

operator -(double, Complex)

Implements the operator -.

public static Complex operator -(double s, Complex a)

Parameters

s double

The s value.

a Complex

The a complex.

Returns

Complex

The result of the operator.

operator -(Complex)

Implements the operator -.

public static Complex operator -(Complex a)

Parameters

a Complex

The a complex.

Returns

Complex

The result of the operator. </complex>