Mat22_cd (struct)¶
The Mat22_cd represents a 2 by 2 matrix. It uses Vec2_cd types for each of the 2 rows.
/*
** Example: Construct Mat22_cd
*/
// create a matrix 2x2
Vec2_cd v0(1.0, 0.0);
Vec2_cd v1(0.0, 1.0);
Mat22_cd mat(v0, v1);
Methods¶
Mat22_cd ( in Complex_d _00, in Complex_d _01, in Complex_d _10, in Complex_d _11 ) | |
Mat22_cd ( in Mat22_cd other ) | |
Mat22_cd ( in Vec2_cd row0, in Vec2_cd row1 ) | |
Mat22_cd () | |
Mat22_cd | add ? ( in Mat22_cd other ) |
Mat22_cd | adjoint ? () |
Boolean | almostEqual ? ( in Mat22_cd other ) |
Boolean | almostEqual ? ( in Mat22_cd other, in Float32 precision ) |
Mat22_cd | clone ? () |
Complex_d | determinant ? () |
Mat22_cd | divideComplex_d ? ( in Complex_d other ) |
Boolean | equal ? ( in Mat22_cd other ) |
UInt32 | hash ? () |
Mat22_cd | inverse ? () |
Mat22_cd | multiply ? ( in Mat22_cd other ) |
Mat22_cd | multiplyComplex_d ? ( in Complex_d other ) |
Vec2_cd | multiplyVector ? ( in Vec2_cd other ) |
set ! ( in Complex_d _00, in Complex_d _01, in Complex_d _10, in Complex_d _11 ) | |
setColumns ! ( in Vec2_cd col0, in Vec2_cd col1 ) | |
setDiagonal ! ( in Complex_d v ) | |
setDiagonal ! ( in Vec2_cd v ) | |
setIdentity ! () | |
setNull ! () | |
setRows ! ( in Vec2_cd row0, in Vec2_cd row1 ) | |
Mat22_cd | subtract ? ( in Mat22_cd other ) |
Mat22_cd | transpose ? () |
Methods in detail¶
Mat22_cd ( in Complex_d _00, in Complex_d _01, in Complex_d _10, in Complex_d _11 )
Constructor from scalars
Mat22_cd ( in Mat22_cd other )
copy constructor
Mat22_cd ( in Vec2_cd row0, in Vec2_cd row1 )
Constructor from vectors
Mat22_cd ()
Mat22_cd Mat22_cd.add? ( in Mat22_cd other )
Overload method for the add operator
Returns the adjoint matrix of this matrix
Boolean Mat22_cd.almostEqual? ( in Mat22_cd other )
Returns true if this matrix is almost the same as another one (using a default precision)
Boolean Mat22_cd.almostEqual? ( in Mat22_cd other, in Float32 precision )
Returns true if this matrix is almost the same as another one (given a precision)
clone method
Complex_d Mat22_cd.determinant? ()
Returns the determinant of this matrix
Mat22_cd Mat22_cd.divideComplex_d? ( in Complex_d other )
Returns the division of this matrix and a scalar
Boolean Mat22_cd.equal? ( in Mat22_cd other )
Returns true if this matrix is the same as another one
Hash for this value
Returns the inverse matrix of this matrix
Mat22_cd Mat22_cd.multiply? ( in Mat22_cd other )
Overload method for the multiply operator
Mat22_cd Mat22_cd.multiplyComplex_d? ( in Complex_d other )
// overload method for the divide operator inline Mat22_cd Mat22_cd.divide(Mat22_cd other) { return this / other; } Returns the product of this matrix and a scalar
Vec2_cd Mat22_cd.multiplyVector? ( in Vec2_cd other )
Returns the product of this matrix and a vector
Mat22_cd.set! ( in Complex_d _00, in Complex_d _01, in Complex_d _10, in Complex_d _11 )
Sets each component with a single scalar value.
Mat22_cd.setColumns! ( in Vec2_cd col0, in Vec2_cd col1 )
Setter from vectors, column-wise
Mat22_cd.setDiagonal! ( in Complex_d v )
setting the diagonal components of this matrix to a scalar
Mat22_cd.setDiagonal! ( in Vec2_cd v )
setting the diagonal components of this matrix to the components of a vector
Mat22_cd.setIdentity! ()
setting this matrix to the identity matrix
Mat22_cd.setNull! ()
setting all components of the matrix to 0.0
Mat22_cd.setRows! ( in Vec2_cd row0, in Vec2_cd row1 )
Setter from vectors, row-wise
Mat22_cd Mat22_cd.subtract? ( in Mat22_cd other )
Overload method for the subtract operator
Mat22_cd Mat22_cd.transpose? ()
Returns the transposed matrix of this matrix