![]() |
Open CASCADE Technology Reference Manual 8.0.0
|
Describes a two column, two row matrix. This sort of object is used in various vectorial or matrix computations. More...
#include <gp_Mat2d.hxx>
Public Member Functions | |
| constexpr | gp_Mat2d () noexcept |
| Creates a matrix with null coefficients. | |
| gp_Mat2d (const gp_XY &theCol1, const gp_XY &theCol2) | |
| theCol1, theCol2 are the 2 columns of the matrix. | |
| void | SetCol (const int theCol, const gp_XY &theValue) |
| Assigns the two coordinates of theValue to the column of range theCol of this matrix Raises OutOfRange if theCol < 1 or theCol > 2. | |
| void | SetCols (const gp_XY &theCol1, const gp_XY &theCol2) |
| Assigns the number pairs theCol1, theCol2 to the two columns of this matrix. | |
| constexpr void | SetDiagonal (const double theX1, const double theX2) noexcept |
| Modifies the main diagonal of the matrix. | |
| constexpr void | SetIdentity () noexcept |
| Modifies this matrix, so that it represents the Identity matrix. | |
| void | SetRotation (const double theAng) |
| Modifies this matrix, so that it represents a rotation. theAng is the angular value in radian of the rotation. | |
| void | SetRow (const int theRow, const gp_XY &theValue) |
| Assigns the two coordinates of theValue to the row of index theRow of this matrix. Raises OutOfRange if theRow < 1 or theRow > 2. | |
| void | SetRows (const gp_XY &theRow1, const gp_XY &theRow2) |
| Assigns the number pairs theRow1, theRow2 to the two rows of this matrix. | |
| constexpr void | SetScale (const double theS) noexcept |
| Modifies the matrix such that it represents a scaling transformation, where theS is the scale factor: | |
| void | SetValue (const int theRow, const int theCol, const double theValue) |
| Assigns <theValue> to the coefficient of row theRow, column theCol of this matrix. Raises OutOfRange if theRow < 1 or theRow > 2 or theCol < 1 or theCol > 2. | |
| gp_XY | Column (const int theCol) const |
| Returns the column of theCol index. Raises OutOfRange if theCol < 1 or theCol > 2. | |
| constexpr double | Determinant () const noexcept |
| Computes the determinant of the matrix. | |
| gp_XY | Diagonal () const |
| Returns the main diagonal of the matrix. | |
| gp_XY | Row (const int theRow) const |
| Returns the row of index theRow. Raised if theRow < 1 or theRow > 2. | |
| const double & | Value (const int theRow, const int theCol) const |
| Returns the coefficient of range (ttheheRow, theCol) Raises OutOfRange if theRow < 1 or theRow > 2 or theCol < 1 or theCol > 2. | |
| const double & | operator() (const int theRow, const int theCol) const |
| double & | ChangeValue (const int theRow, const int theCol) |
| Returns the coefficient of range (theRow, theCol) Raises OutOfRange if theRow < 1 or theRow > 2 or theCol < 1 or theCol > 2. | |
| double & | operator() (const int theRow, const int theCol) |
| constexpr bool | IsSingular () const noexcept |
| Returns true if this matrix is singular (and therefore, cannot be inverted). The Gauss LU decomposition is used to invert the matrix so the matrix is considered as singular if the largest pivot found is lower or equal to Resolution from gp. | |
| constexpr void | Add (const gp_Mat2d &Other) noexcept |
| constexpr void | operator+= (const gp_Mat2d &theOther) noexcept |
| constexpr gp_Mat2d | Added (const gp_Mat2d &theOther) const noexcept |
| Computes the sum of this matrix and the matrix theOther.for each coefficient of the matrix : | |
| constexpr gp_Mat2d | operator+ (const gp_Mat2d &theOther) const noexcept |
| constexpr void | Divide (const double theScalar) |
| constexpr void | operator/= (const double theScalar) |
| constexpr gp_Mat2d | Divided (const double theScalar) const |
| Divides all the coefficients of the matrix by a scalar. | |
| constexpr gp_Mat2d | operator/ (const double theScalar) const |
| void | Invert () |
| gp_Mat2d | Inverted () const |
| Inverses the matrix and raises exception if the matrix is singular. | |
| constexpr gp_Mat2d | Multiplied (const gp_Mat2d &theOther) const noexcept |
| constexpr gp_Mat2d | operator* (const gp_Mat2d &theOther) const noexcept |
| constexpr void | Multiply (const gp_Mat2d &theOther) noexcept |
| Computes the product of two matrices <me> * <theOther> | |
| constexpr void | PreMultiply (const gp_Mat2d &theOther) noexcept |
| Modifies this matrix by premultiplying it by the matrix Other <me> = theOther * <me>. | |
| constexpr gp_Mat2d | Multiplied (const double theScalar) const noexcept |
| constexpr gp_Mat2d | operator* (const double theScalar) const noexcept |
| constexpr void | Multiply (const double theScalar) noexcept |
| Multiplies all the coefficients of the matrix by a scalar. | |
| constexpr void | operator*= (const double theScalar) noexcept |
| void | Power (const int theN) |
| gp_Mat2d | Powered (const int theN) const |
| computes <me> = <me> * <me> * .......* <me>, theN time. if theN = 0 <me> = Identity if theN < 0 <me> = <me>.Invert() *...........* <me>.Invert(). If theN < 0 an exception can be raised if the matrix is not inversible | |
| constexpr void | Subtract (const gp_Mat2d &theOther) noexcept |
| constexpr void | operator-= (const gp_Mat2d &theOther) noexcept |
| constexpr gp_Mat2d | Subtracted (const gp_Mat2d &theOther) const noexcept |
| Computes for each coefficient of the matrix : | |
| constexpr gp_Mat2d | operator- (const gp_Mat2d &theOther) const noexcept |
| constexpr void | Transpose () noexcept |
| constexpr gp_Mat2d | Transposed () const noexcept |
| Transposes the matrix. A(j, i) -> A (i, j) | |
Describes a two column, two row matrix. This sort of object is used in various vectorial or matrix computations.
|
inlineconstexprnoexcept |
Creates a matrix with null coefficients.
theCol1, theCol2 are the 2 columns of the matrix.
Computes the sum of this matrix and the matrix theOther.for each coefficient of the matrix :
Note:
Returns the coefficient of range (theRow, theCol) Raises OutOfRange if theRow < 1 or theRow > 2 or theCol < 1 or theCol > 2.
Returns the column of theCol index. Raises OutOfRange if theCol < 1 or theCol > 2.
Computes the determinant of the matrix.
| gp_XY gp_Mat2d::Diagonal | ( | ) | const |
Returns the main diagonal of the matrix.
Divides all the coefficients of the matrix by a scalar.
| void gp_Mat2d::Invert | ( | ) |
|
inline |
Inverses the matrix and raises exception if the matrix is singular.
Returns true if this matrix is singular (and therefore, cannot be inverted). The Gauss LU decomposition is used to invert the matrix so the matrix is considered as singular if the largest pivot found is lower or equal to Resolution from gp.
Multiplies all the coefficients of the matrix by a scalar.
Computes the product of two matrices <me> * <theOther>
Modifies this matrix by premultiplying it by the matrix Other <me> = theOther * <me>.
Returns the row of index theRow. Raised if theRow < 1 or theRow > 2.
Assigns the two coordinates of theValue to the column of range theCol of this matrix Raises OutOfRange if theCol < 1 or theCol > 2.
Assigns the number pairs theCol1, theCol2 to the two columns of this matrix.
Modifies this matrix, so that it represents the Identity matrix.
Modifies this matrix, so that it represents a rotation. theAng is the angular value in radian of the rotation.
Assigns the two coordinates of theValue to the row of index theRow of this matrix. Raises OutOfRange if theRow < 1 or theRow > 2.
Assigns the number pairs theRow1, theRow2 to the two rows of this matrix.
Assigns <theValue> to the coefficient of row theRow, column theCol of this matrix. Raises OutOfRange if theRow < 1 or theRow > 2 or theCol < 1 or theCol > 2.
Transposes the matrix. A(j, i) -> A (i, j)
Returns the coefficient of range (ttheheRow, theCol) Raises OutOfRange if theRow < 1 or theRow > 2 or theCol < 1 or theCol > 2.