|
AnyCAD Rapid API 2026
Help you to create a better world!
|
Describes a two column, two row matrix. This sort of object is used in various vectorial or matrix computations. 更多...
Public 成员函数 | |
| GMat2d (global::System.IntPtr cPtr, bool cMemoryOwn) | |
| 仅供内部使用 | |
| void | Dispose () |
| GMat2d () | |
| Creates a matrix with null coefficients. | |
| GMat2d (GXY theCol1, GXY theCol2) | |
| theCol1, theCol2 are the 2 columns of the matrix. | |
| void | SetCol (int theCol, GXY 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 (GXY theCol1, GXY theCol2) |
| Assigns the number pairs theCol1, theCol2 to the two columns of this matrix | |
| void | SetDiagonal (double theX1, double theX2) |
| void | SetIdentity () |
| Modifies this matrix, so that it represents the Identity matrix. | |
| void | SetRotation (double theAng) |
| Modifies this matrix, so that it represents a rotation. theAng is the angular value in radian of the rotation. | |
| void | SetRow (int theRow, GXY 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 (GXY theRow1, GXY theRow2) |
| Assigns the number pairs theRow1, theRow2 to the two rows of this matrix. | |
| void | SetScale (double theS) |
| Modifies the matrix such that it represents a scaling transformation, where theS is the scale factor :<code> | theS 0.0 | <me> = | 0.0 theS |</code> | |
| void | SetValue (int theRow, int theCol, 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 | |
| GXY | Column (int theCol) |
| Returns the column of theCol index. Raises OutOfRange if theCol < 1 or theCol > 2 | |
| double | Determinant () |
| Computes the determinant of the matrix. | |
| GXY | Diagonal () |
| Returns the main diagonal of the matrix. | |
| GXY | Row (int theRow) |
| Returns the row of index theRow. Raised if theRow < 1 or theRow > 2 | |
| double | Value (int theRow, int theCol) |
| Returns the coefficient of range (ttheheRow, theCol) Raises OutOfRange if theRow < 1 or theRow > 2 or theCol < 1 or theCol > 2 | |
| bool | IsSingular () |
| 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. | |
| void | Add (GMat2d Other) |
| GMat2d | Added (GMat2d theOther) |
| void | Divide (double theScalar) |
| GMat2d | Divided (double theScalar) |
| Divides all the coefficients of the matrix by a scalar. | |
| void | Invert () |
| GMat2d | Inverted () |
| Inverses the matrix and raises exception if the matrix is singular. | |
| GMat2d | Multiplied (GMat2d theOther) |
| void | Multiply (GMat2d theOther) |
| Computes the product of two matrices <me> * <theOther> | |
| void | PreMultiply (GMat2d theOther) |
| Modifies this matrix by premultiplying it by the matrix Other <me> = theOther * <me>. | |
| GMat2d | Multiplied (double theScalar) |
| void | Multiply (double theScalar) |
| Multiplies all the coefficients of the matrix by a scalar. | |
| void | Power (int theN) |
| GMat2d | Powered (int theN) |
| 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 | |
| void | Subtract (GMat2d theOther) |
| GMat2d | Subtracted (GMat2d theOther) |
| Computes for each coefficient of the matrix :<code> <me>.Coef(i,j) - <theOther>.Coef(i,j)</code> | |
| void | Transpose () |
| GMat2d | Transposed () |
| 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.
Computes the sum of this matrix and the matrix theOther.for each coefficient of the matrix :<code> <me>.Coef(i,j) + <theOther>.Coef(i,j)</code> Note: - operator += assigns the result to this matrix, while - operator + creates a new one.
| void AnyCAD.Foundation.GMat2d.SetDiagonal | ( | double | theX1, |
| double | theX2 ) |
Modifies the main diagonal of the matrix.<code> <me>.Value (1, 1) = theX1 <me>.Value (2, 2) = theX2</code> The other coefficients of the matrix are not modified.