This struct defines a two-dimensional vector of complex numbers. Operators \(a+b\), \(a-b\) and \(a|b\) (Scalar product) can be used. One operand on \(a*b\), \(a/b\) (applied separate on components) can also be a Complex. Implicit casting from Vector is supported.
More...
|
| double | Abs () |
| | Calculates the absolute value of this VectorC object. The absolute value is defined as the square root of Norm().
|
| |
| double | Norm () |
| | Calculates the norm of the present VectorC object. The norm is defined as (X * Complex.Conjugate(X) + Y * Complex.Conjugate(Y)).Re which is equal to the sum of the norms of the vector components.
|
| |
|
void | Normalize () |
| | Normalizes the present VectorC object.
|
| |
| VectorC | Sqrt () |
| | Calculates the square roots of the components of the present VectorC object and returns a new object.
|
| |
| override string | ToString () |
| | Converts this VectorC to a string using the format (real / imaginary, amplitude / phase and so on) defined in the Global Options is used.
|
| |
| string | ToString (ComplexToStringConversionFormat complexNumberFormat, int numberOfDigits) |
| | Converts this VectorC to a string.
|
| |
| | VectorC (Complex x, Complex y) |
| | Creates a VectorC from two Complex values.
|
| |
| | VectorC (VectorC vec) |
| | Creates a new VectorC object from an existing object.
|
| |
| | VectorC (VectorD Re, VectorD Im) |
| | Creates a VectorC from two VectorD objects. The first VectorD stands for the real part of x- and y-component and the second VectorD stands for the imaginary part of the two components.
|
| |
|
| static implicit | operator VectorC (VectorD vectorD) |
| | Converts a VectorD object into a VectorC object.
|
| |
| static bool | operator!= (VectorC vector1, VectorC vector2) |
| | Compares two VectorC for inequality. The comparison will be done by comparing the values of the two x- and y- components respectively.
|
| |
| static VectorC | operator* (Complex factor, VectorC vector) |
| | Multiplies a VectorC object with a Complex value.
|
| |
| static VectorC | operator* (VectorC a, VectorC b) |
| | Multiplies two VectorC objects.
|
| |
| static VectorC | operator* (VectorC vector, Complex factor) |
| | Multiplies a VectorC object with a Complex value.
|
| |
| static VectorC | operator+ (VectorC a, VectorC b) |
| | Adds two VectorC objects.
|
| |
| static VectorC | operator- (VectorC a, VectorC b) |
| | Subtracts two VectorC objects.
|
| |
| static VectorC | operator/ (Complex number, VectorC vector) |
| | Performs a component wise division of a double value and a VectorC object. The result is defined as new VectorC(number / vector.X, number / vector.Y).
|
| |
| static VectorC | operator/ (VectorC a, VectorC b) |
| | Performs a component wise division of two VectorC objects.
|
| |
| static VectorC | operator/ (VectorC vector, Complex divisor) |
| | Performs a component wise division of a VectorC object and a Complex value.
|
| |
| static bool | operator== (VectorC vector1, VectorC vector2) |
| | Compares two VectorC for equality. The comparison will be done by comparing the values of the two x- and y- components respectively.
|
| |
| static Complex | operator| (VectorC a, VectorC b) |
| | Calculates the scalar product of two VectorC objects. The scalar product is defined as a.X * b.X + a.Y * b.Y.
|
| |
| static VectorC | Parse (string vectorCAsString, ComplexToStringConversionFormat complexNumberFormat, NumberFormatInfo doubleFormat=null) |
| | parse function of the VectorC class
|
| |
|
|
Complex | X |
| | X value of the VectorC object.
|
| |
|
Complex | Y |
| | Y value of the VectorC object.
|
| |
|
|
static readonly VectorC | UnitVectorX |
| | A constant containing the unit vector in x-direction.
|
| |
|
static readonly VectorC | UnitVectorY |
| | A constant containing the unit vector in y-direction.
|
| |
|
static readonly VectorC | ZeroVector |
| | A constant containing the zero vector (0, 0).
|
| |
|
|
VectorD | Im [get, set] |
| | Sets or gets a VectorD object containing the the imaginary part of the x- and y-components of the VectorC object. If an VectorD object is set then the real parts of both components are not influenced.
|
| |
|
VectorD | Re [get, set] |
| | Sets or gets a VectorD object containing the the real part of the x- and y-components of the VectorC object. If an VectorD object is set then the imaginary parts of both components are not influenced.
|
| |
This struct defines a two-dimensional vector of complex numbers. Operators \(a+b\), \(a-b\) and \(a|b\) (Scalar product) can be used. One operand on \(a*b\), \(a/b\) (applied separate on components) can also be a Complex. Implicit casting from Vector is supported.
◆ VectorC() [1/3]
Creates a VectorC from two Complex values.
- Parameters
-
| x | X value of new VectorC object. |
| y | Y value of new VectorC object. |
◆ VectorC() [2/3]
Creates a VectorC from two VectorD objects. The first VectorD stands for the real part of x- and y-component and the second VectorD stands for the imaginary part of the two components.
- Parameters
-
| Re | Real part of x- and y-component of new VectorC. |
| Im | Imaginary part of x- and y-component of new VectorC. |
◆ VectorC() [3/3]
Creates a new VectorC object from an existing object.
- Parameters
-
| vec | VectorC object to copy. |
◆ Abs()
Calculates the absolute value of this VectorC object. The absolute value is defined as the square root of Norm().
- Returns
- The absolute value of the VectorC.
◆ Norm()
Calculates the norm of the present VectorC object. The norm is defined as (X * Complex.Conjugate(X) + Y * Complex.Conjugate(Y)).Re which is equal to the sum of the norms of the vector components.
- Returns
- The norm of the VectorC object.
◆ operator VectorC()
Converts a VectorD object into a VectorC object.
- Parameters
-
| vectorD | VectorD object to convert into VectorC object. |
- Returns
- The converted VectorC object.
inheritdoc/>
◆ operator!=()
Compares two VectorC for inequality. The comparison will be done by comparing the values of the two x- and y- components respectively.
- Parameters
-
| vector1 | First VectorC object to compare. |
| vector2 | Second VectorC object to compare. |
- Returns
- Returns true if the two objects are unequal.
◆ operator*() [1/3]
Multiplies a VectorC object with a Complex value.
- Parameters
-
| factor | The Complex value to multiply. |
| vector | The VectorC object to multiply. |
- Returns
- Returns the product of the VectorC object and the Complex value.
◆ operator*() [2/3]
Multiplies two VectorC objects.
- Parameters
-
| a | The first VectorC object to multiply. |
| b | The second VectorC object to multiply. |
- Returns
- Returns the product of the two VectorC objects.
◆ operator*() [3/3]
Multiplies a VectorC object with a Complex value.
- Parameters
-
| vector | The VectorC object to multiply. |
| factor | The Complex value to multiply. |
- Returns
- Returns the product of the VectorC object and the Complex value.
◆ operator+()
Adds two VectorC objects.
- Parameters
-
| a | The first VectorC object to add. |
| b | The second VectorC object to add. |
- Returns
- Returns the sum of the two VectorC objects.
◆ operator-()
Subtracts two VectorC objects.
- Parameters
-
| a | The first VectorC object to subtract from. |
| b | The second VectorC object to subtract. |
- Returns
- Returns the difference of the two VectorC objects.
◆ operator/() [1/3]
Performs a component wise division of a double value and a VectorC object. The result is defined as new VectorC(number / vector.X, number / vector.Y).
- Parameters
-
| number | The double value to divide by the components of the VectorD object. |
| vector | The VectorC object used as divisor. |
- Returns
- Returns the quotient of the double value and the VectorC object.
◆ operator/() [2/3]
Performs a component wise division of two VectorC objects.
- Parameters
-
| a | The first VectorC object to divide by parameter b. |
| b | The second VectorC object used as divisor. |
- Returns
- Returns the quotient of the two VectorC objects.
◆ operator/() [3/3]
Performs a component wise division of a VectorC object and a Complex value.
- Parameters
-
| vector | The VectorC object to divide by the Complex value. |
| divisor | The Complex value used as divisor. |
- Returns
- Returns the quotient of the VectorC object and the Complex value.
◆ operator==()
Compares two VectorC for equality. The comparison will be done by comparing the values of the two x- and y- components respectively.
- Parameters
-
| vector1 | First VectorC object to compare. |
| vector2 | Second VectorC object to compare. |
- Returns
- Returns true if the two objects are equal.
◆ operator|()
Calculates the scalar product of two VectorC objects. The scalar product is defined as a.X * b.X + a.Y * b.Y.
- Parameters
-
| a | First VectorC object. |
| b | Second VectorC object. |
- Returns
- Scalar product of the two VectorC objects.
◆ Parse()
parse function of the VectorC class
- Parameters
-
| vectorCAsString | the string which should be parsed |
| complexNumberFormat | The format of the complex numbers (real / imaginary, amplitude / phase and so on). |
| doubleFormat | The format of the double numbers, especially the decimal separator. If this optional parameter is not specified the default format ('.' as decimal separator) is used. |
- Returns
- the VectorC object which was parsed from input string
- Exceptions
-
| System.ArgumentException | The VectorC could not be parsed. |
◆ Sqrt()
Calculates the square roots of the components of the present VectorC object and returns a new object.
- Returns
- The square root of the components of this VectorC object.
◆ ToString() [1/2]
| override string ToString |
( |
| ) |
|
Converts this VectorC to a string using the format (real / imaginary, amplitude / phase and so on) defined in the Global Options is used.
- Returns
- String containing the VectorC information.
◆ ToString() [2/2]
Converts this VectorC to a string.
- Parameters
-
| complexNumberFormat | The complex number format (real / imaginary, amplitude / phase and so on) to be used for the conversion. |
| numberOfDigits | The number of significant digits. |
- Returns
- String containing the VectorC information.