|
Programming Reference for VirtualLab Fusion
2022.1
|
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...
Public Member Functions | |
| double | Abs () |
| Calculates the absolute value of this VectorC object. The absolute value is defined as the square root of Norm(). More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| string | ToString (ComplexToStringConversionFormat complexNumberFormat, int numberOfDigits) |
| Converts this VectorC to a string. More... | |
| VectorC (Complex x, Complex y) | |
| Creates a VectorC from two Complex values. More... | |
| VectorC (VectorC vec) | |
| Creates a new VectorC object from an existing object. More... | |
| 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. More... | |
Static Public Member Functions | |
| static implicit | operator VectorC (VectorD vectorD) |
| Converts a VectorD object into a VectorC object. More... | |
| 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. More... | |
| static VectorC | operator* (Complex factor, VectorC vector) |
| Multiplies a VectorC object with a Complex value. More... | |
| static VectorC | operator* (VectorC a, VectorC b) |
| Multiplies two VectorC objects. More... | |
| static VectorC | operator* (VectorC vector, Complex factor) |
| Multiplies a VectorC object with a Complex value. More... | |
| static VectorC | operator+ (VectorC a, VectorC b) |
| Adds two VectorC objects. More... | |
| static VectorC | operator- (VectorC a, VectorC b) |
| Subtracts two VectorC objects. More... | |
| 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). More... | |
| static VectorC | operator/ (VectorC a, VectorC b) |
| Performs a component wise division of two VectorC objects. More... | |
| static VectorC | operator/ (VectorC vector, Complex divisor) |
| Performs a component wise division of a VectorC object and a Complex value. More... | |
| 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. More... | |
| 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. More... | |
| static VectorC | Parse (string vectorCAsString, ComplexToStringConversionFormat complexNumberFormat, NumberFormatInfo doubleFormat=null) |
| parse function of the VectorC class More... | |
Public Attributes | |
| Complex | X |
| X value of the VectorC object. | |
| Complex | Y |
| Y value of the VectorC object. | |
Static Public Attributes | |
| 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). | |
Properties | |
| 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.
| double Abs | ( | ) |
| double Norm | ( | ) |
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).
| number | The double value to divide by the components of the VectorD object. |
| vector | The VectorC object used as divisor. |
|
static |
parse function of the VectorC class
| 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. |
| System.ArgumentException | The VectorC could not be parsed. |
| VectorC Sqrt | ( | ) |
| override string ToString | ( | ) |
| string ToString | ( | ComplexToStringConversionFormat | complexNumberFormat, |
| int | numberOfDigits | ||
| ) |