Struct Complex
- Namespace
- Aspose.Imaging.ImageFilters.ComplexUtils
- Assembly
- Aspose.Imaging.dll
The complex number structure.
public struct Complex : IEquatable<Complex>
- Implements
- Inherited Members
Constructors
Complex(Complex)
Initializes a new instance of the Complex struct.
public Complex(Complex c)
Parameters
c
ComplexThe complex number.
Complex(double, double)
Initializes a new instance of the Complex struct.
public Complex(double real, double imaginary)
Parameters
Fields
I
I complex having Im equal to 1.
public static readonly Complex I
Field Value
One
public static readonly Complex One
Field Value
SizeOfComplex
The size of complex.
public static readonly int SizeOfComplex
Field Value
SizeOfDouble
The size of double.
public static readonly int SizeOfDouble
Field Value
Zero
Zero complex.
public static readonly Complex Zero
Field Value
Properties
Im
Gets or sets the imaginary part.
public double Im { get; set; }
Property Value
Magnitude
Gets the magnitude.
public double Magnitude { get; }
Property Value
- double
The magnitude.
Phase
Gets the phase.
public double Phase { get; }
Property Value
- double
The phase.
Re
Gets or sets the real part.
public double Re { get; set; }
Property Value
SquaredMagnitude
Gets the squared magnitude.
public double SquaredMagnitude { get; }
Property Value
- double
The squared magnitude.
Methods
Add(Complex, Complex)
Adds a
and b
.
public static Complex Add(Complex a, Complex b)
Parameters
Returns
- Complex
The sum complex.
Add(Complex, Complex, ref Complex)
Adds a
and b
.
public static void Add(Complex a, Complex b, ref Complex result)
Parameters
Add(Complex, double)
Adds a
and s
.
public static Complex Add(Complex a, double s)
Parameters
Returns
- Complex
The complex with its Re increased by
s
.
Add(Complex, double, ref Complex)
Adds a
and s
.
public static void Add(Complex a, double s, ref Complex result)
Parameters
ApproxEqual(Complex, Complex)
Checks approximate equality.
public static bool ApproxEqual(Complex a, Complex b)
Parameters
Returns
- bool
The approximate equality result.
ApproxEqual(Complex, Complex, double)
Checks approximate equality.
public static bool ApproxEqual(Complex a, Complex b, double tolerance)
Parameters
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
ComplexThe a complex.
Returns
- Complex
Cos of
a
.
Divide(Complex, Complex)
Divides a
by b
.
public static Complex Divide(Complex a, Complex b)
Parameters
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
Exceptions
- DivideByZeroException
Can not divide by zero.
Divide(Complex, double)
Divides a
by s
.
public static Complex Divide(Complex a, double s)
Parameters
Returns
- Complex
The result of division.
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
Exceptions
- DivideByZeroException
Can not divide by zero.
Divide(double, Complex)
Divides a
by s
.
public static Complex Divide(double s, Complex a)
Parameters
Returns
- Complex
The result of division.
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
Exceptions
- DivideByZeroException
Can not divide by zero.
Equals(Complex)
Determines whether the specified object, is equal to this instance.
public bool Equals(Complex other)
Parameters
Returns
Equals(object)
Determines whether the specified object, is equal to this instance.
public override bool Equals(object obj)
Parameters
Returns
Exp(Complex)
Raises e by a
.
public static Complex Exp(Complex a)
Parameters
a
ComplexThe 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
ComplexThe a complex.
Returns
- Complex
The log of
a
.
Multiply(Complex, Complex)
Multiplies a
by b
.
public static Complex Multiply(Complex a, Complex b)
Parameters
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
Multiply(Complex, double)
Multiplies a
by s
.
public static Complex Multiply(Complex a, double s)
Parameters
Returns
- Complex
The result of multiplication.
Multiply(Complex, double, ref Complex)
Multiplies a
by s
.
public static void Multiply(Complex a, double s, ref Complex result)
Parameters
Negate(Complex)
Negates a
.
public static Complex Negate(Complex a)
Parameters
a
ComplexThe a complex.
Returns
- Complex
The result of negation.
Parse(string)
Parses the specified s
into a Complex.
public static Complex Parse(string s)
Parameters
s
stringThe 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
ComplexThe a complex.
Returns
- Complex
Sin of
a
.
Sqrt(Complex)
Gets square root of a
.
public static Complex Sqrt(Complex a)
Parameters
a
ComplexThe a complex.
Returns
- Complex
The square root.
Subtract(Complex, Complex)
Subtracts b
from a
.
public static Complex Subtract(Complex a, Complex b)
Parameters
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
Subtract(Complex, double)
Subtracts s
from a
.
public static Complex Subtract(Complex a, double s)
Parameters
Returns
- Complex
The result of subtraction.
Subtract(Complex, double, ref Complex)
Subtracts s
from a
.
public static void Subtract(Complex a, double s, ref Complex result)
Parameters
Subtract(double, Complex)
Subtracts s
from a
.
public static Complex Subtract(double s, Complex a)
Parameters
Returns
- Complex
The result of subtraction.
Subtract(double, Complex, ref Complex)
Subtracts a
from s
.
public static void Subtract(double s, Complex a, ref Complex result)
Parameters
Tan(Complex)
Gets Tan of a
.
public static Complex Tan(Complex a)
Parameters
a
ComplexThe a complex.
Returns
- Complex
Tan of
a
.
ToString()
Returns a string that represents this instance.
public override string ToString()
Returns
TryParse(string, out Complex)
Tries to parse the specified s
into a Complex.
public static bool TryParse(string s, out Complex result)
Parameters
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
Returns
- Complex
The result of the operator.
operator +(Complex, double)
Implements the operator +.
public static Complex operator +(Complex a, double s)
Parameters
Returns
- Complex
The result of the operator.
operator +(double, Complex)
Implements the operator +.
public static Complex operator +(double s, Complex a)
Parameters
Returns
- Complex
The result of the operator.
operator /(Complex, Complex)
Implements the operator /.
public static Complex operator /(Complex a, Complex b)
Parameters
Returns
- Complex
The result of the operator.
operator /(Complex, double)
Implements the operator /.
public static Complex operator /(Complex a, double s)
Parameters
Returns
- Complex
The result of the operator.
operator /(double, Complex)
Implements the operator /.
public static Complex operator /(double s, Complex a)
Parameters
Returns
- Complex
The result of the operator.
operator ==(Complex, Complex)
Implements the operator ==.
public static bool operator ==(Complex a, Complex b)
Parameters
Returns
- bool
The result of the operator.
explicit operator Complex(double)
public static explicit operator Complex(double value)
Parameters
value
doubleThe value.
Returns
- Complex
The result of the conversion.
explicit operator Complex(float)
public static explicit operator Complex(float value)
Parameters
value
floatThe value.
Returns
- Complex
The result of the conversion.
operator !=(Complex, Complex)
Implements the operator !=.
public static bool operator !=(Complex a, Complex b)
Parameters
Returns
- bool
The result of the operator.
operator *(Complex, Complex)
Implements the operator *.
public static Complex operator *(Complex a, Complex b)
Parameters
Returns
- Complex
The result of the operator.
operator *(Complex, double)
Implements the operator *.
public static Complex operator *(Complex a, double s)
Parameters
Returns
- Complex
The result of the operator.
operator *(double, Complex)
Implements the operator *.
public static Complex operator *(double s, Complex a)
Parameters
Returns
- Complex
The result of the operator.
operator -(Complex, Complex)
Implements the operator -.
public static Complex operator -(Complex a, Complex b)
Parameters
Returns
- Complex
The result of the operator.
operator -(Complex, double)
Implements the operator -.
public static Complex operator -(Complex a, double s)
Parameters
Returns
- Complex
The result of the operator.
operator -(double, Complex)
Implements the operator -.
public static Complex operator -(double s, Complex a)
Parameters
Returns
- Complex
The result of the operator.
operator -(Complex)
Implements the operator -.
public static Complex operator -(Complex a)
Parameters
a
ComplexThe a complex.
Returns
- Complex
The result of the operator.