AnyCAD Rapid API 2024
Help you to create a better world!
载入中...
搜索中...
未找到
GMat2d类 参考

Public 成员函数

 GMat2d ()
 
 GMat2d (GXY theCol1, GXY theCol2)
 
void SetCol (int theCol, GXY theValue)
 
void SetCols (GXY theCol1, GXY theCol2)
 
void SetDiagonal (double theX1, double theX2)
 
void SetIdentity ()
 
void SetRotation (double theAng)
 
void SetRow (int theRow, GXY theValue)
 
void SetRows (GXY theRow1, GXY theRow2)
 
void SetScale (double theS)
 
void SetValue (int theRow, int theCol, double theValue)
 
GXY Column (int theCol)
 
double Determinant ()
 
GXY Diagonal ()
 
GXY Row (int theRow)
 
double Value (int theRow, int theCol)
 
boolean IsSingular ()
 
void Add (GMat2d Other)
 
GMat2d Added (GMat2d theOther)
 
void Divide (double theScalar)
 
GMat2d Divided (double theScalar)
 
void Invert ()
 
GMat2d Inverted ()
 
GMat2d Multiplied (GMat2d theOther)
 
void Multiply (GMat2d theOther)
 
void PreMultiply (GMat2d theOther)
 
GMat2d Multiplied (double theScalar)
 
void Multiply (double theScalar)
 
void Power (int theN)
 
GMat2d Powered (int theN)
 
void Subtract (GMat2d theOther)
 
GMat2d Subtracted (GMat2d theOther)
 
void Transpose ()
 
GMat2d Transposed ()
 

详细描述

Describes a two column, two row matrix. This sort of object is used in various vectorial or matrix computations.

构造及析构函数说明

◆ GMat2d() [1/2]

GMat2d.GMat2d ( )

Creates a matrix with null coefficients.

◆ GMat2d() [2/2]

GMat2d.GMat2d ( GXY theCol1,
GXY theCol2 )

theCol1, theCol2 are the 2 columns of the matrix.

成员函数说明

◆ Added()

GMat2d GMat2d.Added ( GMat2d theOther)

Computes the sum of this matrix and the matrix theOther.for each coefficient of the matrix : <me>.Coef(i,j) + <theOther>.Coef(i,j) Note: - operator += assigns the result to this matrix, while - operator + creates a new one.

◆ Column()

GXY GMat2d.Column ( int theCol)

Returns the column of theCol index. Raises OutOfRange if theCol < 1 or theCol > 2

◆ Determinant()

double GMat2d.Determinant ( )

Computes the determinant of the matrix.

◆ Diagonal()

GXY GMat2d.Diagonal ( )

Returns the main diagonal of the matrix.

◆ Divided()

GMat2d GMat2d.Divided ( double theScalar)

Divides all the coefficients of the matrix by a scalar.

◆ Inverted()

GMat2d GMat2d.Inverted ( )

Inverses the matrix and raises exception if the matrix is singular.

◆ IsSingular()

boolean GMat2d.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.

◆ Multiply() [1/2]

void GMat2d.Multiply ( double theScalar)

Multiplies all the coefficients of the matrix by a scalar.

◆ Multiply() [2/2]

void GMat2d.Multiply ( GMat2d theOther)

Computes the product of two matrices <me> * <theOther>

◆ Powered()

GMat2d 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

◆ PreMultiply()

void GMat2d.PreMultiply ( GMat2d theOther)

Modifies this matrix by premultiplying it by the matrix Other <me> = theOther * <me>.

◆ Row()

GXY GMat2d.Row ( int theRow)

Returns the row of index theRow. Raised if theRow < 1 or theRow > 2

◆ SetCol()

void GMat2d.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.

◆ SetCols()

void GMat2d.SetCols ( GXY theCol1,
GXY theCol2 )

Assigns the number pairs theCol1, theCol2 to the two columns of this matrix

◆ SetDiagonal()

void GMat2d.SetDiagonal ( double theX1,
double theX2 )

Modifies the main diagonal of the matrix. <me>.Value (1, 1) = theX1 <me>.Value (2, 2) = theX2 The other coefficients of the matrix are not modified.

◆ SetIdentity()

void GMat2d.SetIdentity ( )

Modifies this matrix, so that it represents the Identity matrix.

◆ SetRotation()

void GMat2d.SetRotation ( double theAng)

Modifies this matrix, so that it represents a rotation. theAng is the angular value in radian of the rotation.

◆ SetRow()

void GMat2d.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.

◆ SetRows()

void GMat2d.SetRows ( GXY theRow1,
GXY theRow2 )

Assigns the number pairs theRow1, theRow2 to the two rows of this matrix.

◆ SetScale()

void GMat2d.SetScale ( double theS)

Modifies the matrix such that it represents a scaling transformation, where theS is the scale factor : | theS 0.0 | <me> = | 0.0 theS |

◆ SetValue()

void GMat2d.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

◆ Subtracted()

GMat2d GMat2d.Subtracted ( GMat2d theOther)

Computes for each coefficient of the matrix : <me>.Coef(i,j) - <theOther>.Coef(i,j)

◆ Transposed()

GMat2d GMat2d.Transposed ( )

Transposes the matrix. A(j, i) -> A (i, j)

◆ Value()

double GMat2d.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