This class is subject to change. Programs using this class may require changes with a new version of VirtualLab.
This class defines a 3x3 Matrix of double numbers.
Operators ( \(a+b\), \(a-b\)). Operator ( \(a*b\)) supports \(b\) as double or VectorD as well.
More...
|
|
override object | Clone () |
| |
| double | Determinant () |
| | Calculates the determinant of current Matrix3x3.
|
| |
| override bool | Equals (object matrix, EqualityIntent equalityIntent) |
| | Compares two matrices for equality.
|
| |
| Vector3D | GetCol (int index) |
| | Returns specified column current Matrix3x3 as VectorD.
|
| |
| override int | GetHashCode () |
| | Returns a hash code for this instance.
|
| |
| Matrix3x3D | GetInverse () |
| | Calculates the inverse Matrix3x3 of current one.
|
| |
| Vector3D | GetRow (int index) |
| | Returns specified row current Matrix3x3 as VectorD.
|
| |
| Matrix3x3D | GetTransposed () |
| | Returns transposed Matrix3x3 of current one.
|
| |
| bool | IsIdentity () |
| | Checks whether the matrix is the identity matrix.
|
| |
| bool | IsIdentityNumericalChecks () |
| | Checks whether the matrix is the identity matrix.
|
| |
| bool | IsOrthogonal () |
| | Checks if matrix is orthogonal, i.e. if M * M^T is the identity matrix.
|
| |
| | Matrix3x3D () |
| | Standard constructor, creates an empty (all zero values) matrix.
|
| |
| | Matrix3x3D (double c) |
| | Constructor to get a diagonal matrix having constant value \(c\) on all diagonal elements.
|
| |
| | Matrix3x3D (double m11, double m21, double m31, double m12, double m22, double m32, double m13, double m23, double m33) |
| | Constructor taking nine doubles to initialize Matrix3x3.
|
| |
| | Matrix3x3D (Matrix3x3D matC) |
| | Copy constructor.
|
| |
| | Matrix3x3D (Vector3D firstCol, Vector3D secondCol, Vector3D thirdCol) |
| | Constructor taking three VectorD to initialize Matrix3x3.
|
| |
| override string | ToString () |
| | Returns an output string representing current Matrix3x3.
|
| |
|
| static Matrix3x3D | InverseMatrix (Matrix3x3D mat) |
| | Calculates inverse current Matrix3x3 of the given one.
|
| |
| static bool | operator!= (Matrix3x3D a, Matrix3x3D b) |
| | Checks to matrices for inequality.
|
| |
| static Matrix3x3D | operator* (double b, Matrix3x3D a) |
| | Multiplies a Matrix3x3D with a scalar.
|
| |
| static Matrix3x3D | operator* (Matrix3x3D a, double b) |
| | Multiplies a Matrix3x3D with a scalar.
|
| |
| static Matrix3x3D | operator* (Matrix3x3D a, Matrix3x3D b) |
| | Multiplies the elements of two Matrix3x3D objects.
|
| |
| static Vector3C | operator* (Matrix3x3D a, Vector3C vec) |
| | Multiplies a Matrix with an 3-dim. complex Vector (A*Vec)
|
| |
| static Vector3D | operator* (Matrix3x3D a, Vector3D vec) |
| | Multiplies a Matrix with an 3-dim. Vector (A*Vec)
|
| |
| static Matrix3x3D | operator+ (Matrix3x3D a, Matrix3x3D b) |
| | Adds the elements of two Matrix3x3D objects.
|
| |
| static Matrix3x3D | operator- (Matrix3x3D a, Matrix3x3D b) |
| | Subtracts the elements of two Matrix3x3D objects.
|
| |
| static bool | operator== (Matrix3x3D a, Matrix3x3D b) |
| | Compares two matrices. Two matrices are equal when they are equal in all elements.
|
| |
| static bool | TryParse (string matrixText, out Matrix3x3D matrix3x3D) |
| | Tries to parse a Matrix3x3D object from a string.
|
| |
|
|
double[] | Elements |
| | The field in which the double elements are stored. Note that indices [1..9] are interpreted mathematical. [0] exists but contains no information. Mapping of rows [1..3] and columns [1..3] to one-dimensional index \(i\) is defined by: \(i := row + 3 * (column-1)\).
|
| |
|
|
static Matrix3x3D | Identity [get] |
| | Static property which gives the identity matrix.
|
| |
| double | this[int row, int col] [get, set] |
| | Gets or sets a certain matrix element.
|
| |
This class is subject to change. Programs using this class may require changes with a new version of VirtualLab.
This class defines a 3x3 Matrix of double numbers.
Operators ( \(a+b\), \(a-b\)). Operator ( \(a*b\)) supports \(b\) as double or VectorD as well.
◆ Matrix3x3D() [1/5]
Standard constructor, creates an empty (all zero values) matrix.
◆ Matrix3x3D() [2/5]
Constructor to get a diagonal matrix having constant value \(c\) on all diagonal elements.
- Parameters
-
| c | Value \(c\) used to initialize diagonal elements. |
◆ Matrix3x3D() [3/5]
Copy constructor.
- Parameters
-
| matC | Matrix3x3D to be copied. |
◆ Matrix3x3D() [4/5]
Constructor taking three VectorD to initialize Matrix3x3.
- Parameters
-
| firstCol | First column. |
| secondCol | Second column. |
| thirdCol | Third column. |
◆ Matrix3x3D() [5/5]
| Matrix3x3D |
( |
double |
m11, |
|
|
double |
m21, |
|
|
double |
m31, |
|
|
double |
m12, |
|
|
double |
m22, |
|
|
double |
m32, |
|
|
double |
m13, |
|
|
double |
m23, |
|
|
double |
m33 |
|
) |
| |
Constructor taking nine doubles to initialize Matrix3x3.
- Parameters
-
| m11 | First element of first column. |
| m21 | Second element of first column. |
| m31 | Third element of first column. |
| m12 | First element of second column. |
| m22 | Second element of second column. |
| m32 | Third element of second column. |
| m13 | First element of third column. |
| m23 | Second element of third column. |
| m33 | Third element of third column. |
◆ Determinant()
Calculates the determinant of current Matrix3x3.
- Returns
◆ Equals()
| override bool Equals |
( |
object |
matrix, |
|
|
EqualityIntent |
equalityIntent |
|
) |
| |
Compares two matrices for equality.
- Parameters
-
| matrix | matrix to compare with |
| equalityIntent | |
- Returns
True if the two matrices store the same values.
◆ GetCol()
Returns specified column current Matrix3x3 as VectorD.
- Parameters
-
| index | Column to return (index is one-based!). |
- Returns
- Result of operation.
◆ GetHashCode()
| override int GetHashCode |
( |
| ) |
|
Returns a hash code for this instance.
- Returns
- A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
◆ GetInverse()
Calculates the inverse Matrix3x3 of current one.
- Returns
◆ GetRow()
Returns specified row current Matrix3x3 as VectorD.
- Parameters
-
| index | Row to return (index is one-based!). |
- Returns
- Result of operation.
◆ GetTransposed()
Returns transposed Matrix3x3 of current one.
- Returns
- Result of operation..
◆ InverseMatrix()
Calculates inverse current Matrix3x3 of the given one.
- Parameters
-
- Returns
- Result of operation.
◆ IsIdentity()
Checks whether the matrix is the identity matrix.
- Returns
- TRUE iff the matrix is the identity matrix
◆ IsIdentityNumericalChecks()
| bool IsIdentityNumericalChecks |
( |
| ) |
|
Checks whether the matrix is the identity matrix.
- Returns
- TRUE iff the matrix is the identity matrix
◆ IsOrthogonal()
Checks if matrix is orthogonal, i.e. if M * M^T is the identity matrix.
- Returns
- True iff matrix is orthogonal
◆ operator!=()
Checks to matrices for inequality.
- Parameters
-
| a | first matrix |
| b | second matrix |
- Returns
- FALSE if they are equal, otherwise TRUE.
◆ operator*() [1/5]
Multiplies a Matrix3x3D with a scalar.
- Parameters
-
- Returns
- product
◆ operator*() [2/5]
Multiplies a Matrix3x3D with a scalar.
- Parameters
-
- Returns
- product
◆ operator*() [3/5]
Multiplies the elements of two Matrix3x3D objects.
- Parameters
-
| a | the first matrix |
| b | the second matrix |
- Returns
- The product of the two matrices.
◆ operator*() [4/5]
Multiplies a Matrix with an 3-dim. complex Vector (A*Vec)
- Parameters
-
- Returns
- Product: Vector3C
◆ operator*() [5/5]
Multiplies a Matrix with an 3-dim. Vector (A*Vec)
- Parameters
-
- Returns
- Product: Vector3D
◆ operator+()
Adds the elements of two Matrix3x3D objects.
- Parameters
-
| a | the first matrix |
| b | the second matrix |
- Returns
- The sum of the two matrices.
◆ operator-()
Subtracts the elements of two Matrix3x3D objects.
- Parameters
-
| a | the first matrix |
| b | the second matrix |
- Returns
- The Difference of the two matrices.
◆ operator==()
Compares two matrices. Two matrices are equal when they are equal in all elements.
- Parameters
-
| a | first matrix |
| b | second matrix |
- Returns
- TRUE if they are equal, otherwise false.
◆ ToString()
| override string ToString |
( |
| ) |
|
Returns an output string representing current Matrix3x3.
- Returns
- A string that represents the current object.
◆ TryParse()
| static bool TryParse |
( |
string |
matrixText, |
|
|
out Matrix3x3D |
matrix3x3D |
|
) |
| |
|
static |
Tries to parse a Matrix3x3D object from a string.
- Parameters
-
| matrixText | String which have to be formatted like inside Marix3x3D.ToString() |
| matrix3x3D | The parsed matrix if parse has been possible. Null otherwise. |
- Returns
- A flag indicating whether or not the parsing was successful.
◆ this[int row, int col]
| double this[int row, int col] |
|
getset |
Gets or sets a certain matrix element.
The selected matrix element.
- Parameters
-
| row | The zero-based row index. |
| col | The zero-based column index. |
- Returns
- The element at the specified matrix position.
- Exceptions
-
| System.ArgumentOutOfRangeException | At least one of the two given indices is out of range. |