Programming Reference for VirtualLab Fusion  2025.1
Loading...
Searching...
No Matches
Matrix3x3C Class Reference

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 complex numbers.
Operators ( \(a+b\), \(a-b\)). Operator ( \(a*b\)) supports \(b\) as complex or Vector3C as well. More...

Public Member Functions

override int GetHashCode ()
 Returns a hash code for this instance.
 
 Matrix3x3C ()
 Standard constructor, creates an empty (all zero values) matrix.
 
 Matrix3x3C (Complex c)
 Constructor to get a diagonal matrix having constant value \(c\) on all diagonal elements.
 
 Matrix3x3C (Complex m11, Complex m21, Complex m31, Complex m12, Complex m22, Complex m32, Complex m13, Complex m23, Complex m33)
 Constructor taking nine complex to initialize Matrix3x3C.
 
 Matrix3x3C (Matrix3x3C matC)
 Copy constructor.
 
 Matrix3x3C (Vector3C firstCol, Vector3C secondCol, Vector3C thirdCol)
 Constructor taking three VectorC to initialize Matrix3x3C.
 

Static Public Member Functions

static Matrix3x3C operator* (double b, Matrix3x3C a)
 Multiplies a Matrix3x3C with a scalar.
 
static Matrix3x3C operator* (Matrix3x3C a, double b)
 Multiplies a Matrix3x3C with a scalar.
 
static Matrix3x3C operator* (Matrix3x3C a, Matrix3x3C b)
 Multiplies the elements of two Matrix3x3C objects.
 
static Matrix3x3C operator* (Matrix3x3C a, Matrix3x3D b)
 Multiplies the elements of two 3x3 matrices.
 
static Vector3C operator* (Matrix3x3C a, Vector3C vec)
 Multiplies a Matrix with an 3-dim. complex Vector (A*Vec)
 
static Matrix3x3C operator* (Matrix3x3D a, Matrix3x3C b)
 Multiplies the elements of two 3x3 matrices objects.
 
static Matrix3x3C operator+ (Matrix3x3C a, Matrix3x3C b)
 Adds the elements of two Matrix3x3C objects.
 
static Matrix3x3C operator- (Matrix3x3C a, Matrix3x3C b)
 Subtracts the elements of two Matrix3x3C objects.
 
static bool operator== (Matrix3x3C a, Matrix3x3C b)
 Compares two matrices. Two matrices are equal when they are equal in all elements.
 

Public Attributes

Complex[] _elements
 The field in which the complex 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)\).
 

Properties

Complex this[int row, int col] [get, set]
 Gets or sets a certain matrix element.
 

Detailed Description

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 complex numbers.
Operators ( \(a+b\), \(a-b\)). Operator ( \(a*b\)) supports \(b\) as complex or Vector3C as well.

Constructor & Destructor Documentation

◆ Matrix3x3C() [1/5]

Standard constructor, creates an empty (all zero values) matrix.


◆ Matrix3x3C() [2/5]

Constructor to get a diagonal matrix having constant value \(c\) on all diagonal elements.

Parameters
cValue \(c\) used to initialize diagonal elements.

◆ Matrix3x3C() [3/5]

Copy constructor.

Parameters
matCMatrix3x3C to be copied.

◆ Matrix3x3C() [4/5]

Matrix3x3C ( Vector3C  firstCol,
Vector3C  secondCol,
Vector3C  thirdCol 
)

Constructor taking three VectorC to initialize Matrix3x3C.

Parameters
firstColFirst column.
secondColSecond column.
thirdColThird column.

◆ Matrix3x3C() [5/5]

Matrix3x3C ( Complex  m11,
Complex  m21,
Complex  m31,
Complex  m12,
Complex  m22,
Complex  m32,
Complex  m13,
Complex  m23,
Complex  m33 
)

Constructor taking nine complex to initialize Matrix3x3C.

Parameters
m11First element of first column.
m21Second element of first column.
m31Third element of first column.
m12First element of second column.
m22Second element of second column.
m32Third element of second column.
m13First element of third column.
m23Second element of third column.
m33Third element of third column.

Member Function Documentation

◆ 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.

◆ operator*() [1/6]

static Matrix3x3C operator* ( double  b,
Matrix3x3C  a 
)
static

Multiplies a Matrix3x3C with a scalar.

Parameters
bscalar
aMatrix
Returns
product

◆ operator*() [2/6]

static Matrix3x3C operator* ( Matrix3x3C  a,
double  b 
)
static

Multiplies a Matrix3x3C with a scalar.

Parameters
aMatrix
bscalar
Returns
product

◆ operator*() [3/6]

static Matrix3x3C operator* ( Matrix3x3C  a,
Matrix3x3C  b 
)
static

Multiplies the elements of two Matrix3x3C objects.

Parameters
athe first matrix
bthe second matrix
Returns
The product of the two matrices.

◆ operator*() [4/6]

static Matrix3x3C operator* ( Matrix3x3C  a,
Matrix3x3D  b 
)
static

Multiplies the elements of two 3x3 matrices.

Parameters
athe first matrix
bthe second matrix
Returns
The product of the two matrices.

◆ operator*() [5/6]

static Vector3C operator* ( Matrix3x3C  a,
Vector3C  vec 
)
static

Multiplies a Matrix with an 3-dim. complex Vector (A*Vec)

Parameters
a3x3-Matrix
vecVector3C
Returns
Product: Vector3C

◆ operator*() [6/6]

static Matrix3x3C operator* ( Matrix3x3D  a,
Matrix3x3C  b 
)
static

Multiplies the elements of two 3x3 matrices objects.

Parameters
athe first matrix
bthe second matrix
Returns
The product of the two matrices.

◆ operator+()

static Matrix3x3C operator+ ( Matrix3x3C  a,
Matrix3x3C  b 
)
static

Adds the elements of two Matrix3x3C objects.

Parameters
athe first matrix
bthe second matrix
Returns
The sum of the two matrices.

◆ operator-()

static Matrix3x3C operator- ( Matrix3x3C  a,
Matrix3x3C  b 
)
static

Subtracts the elements of two Matrix3x3C objects.

Parameters
athe first matrix
bthe second matrix
Returns
The Difference of the two matrices.

◆ operator==()

static bool operator== ( Matrix3x3C  a,
Matrix3x3C  b 
)
static

Compares two matrices. Two matrices are equal when they are equal in all elements.

Parameters
afirst matrix
bsecond matrix
Returns
TRUE if they are equal, otherwise false.

Property Documentation

◆ this[int row, int col]

Complex this[int row, int col]
getset

Gets or sets a certain matrix element.

The selected matrix element.

Parameters
rowThe zero-based row index.
colThe zero-based column index.
Returns
The element at the specified matrix position.
Exceptions
System.ArgumentOutOfRangeExceptionAt least one of the two given indices is out of range.