|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuavsim.flightdynamicsmodel.Matrix
public class Matrix
Defines a general-purpose 3x3 mathematical matrix. For compatibility with the other classes derived from the original source (Physics for Game Developers by David Bourg), the member variables are public and mutable. Eventually they will be protected appropriately. In addition, some methods inconsistently operate in place, while others behave as expected and return a new affected instance of the matrix.
| Field Summary | |
|---|---|
double |
_e11
the elements with row/column indexing with (1,1) as top left |
double |
_e12
the elements with row/column indexing with (1,1) as top left |
double |
_e13
the elements with row/column indexing with (1,1) as top left |
double |
_e21
the elements with row/column indexing with (1,1) as top left |
double |
_e22
the elements with row/column indexing with (1,1) as top left |
double |
_e23
the elements with row/column indexing with (1,1) as top left |
double |
_e31
the elements with row/column indexing with (1,1) as top left |
double |
_e32
the elements with row/column indexing with (1,1) as top left |
double |
_e33
the elements with row/column indexing with (1,1) as top left |
| Constructor Summary | |
|---|---|
Matrix()
Creates a matrix with all entries zero. |
|
Matrix(double e11,
double e12,
double e13,
double e21,
double e22,
double e23,
double e31,
double e32,
double e33)
Creates a matrix with the entries in row/column format. |
|
| Method Summary | |
|---|---|
Matrix |
add(Matrix matrix)
Calculates the sum of this matrix and another. |
Matrix |
clone()
|
double |
determinant()
Calculates the determinant of this matrix. |
Matrix |
divide(double scale)
Calculates the scaled entries of this matrix. |
Matrix |
inverse()
Calculates the inverse of this matrix. |
Matrix |
multiply(double scale)
Calculates the scaled entries of this matrix. |
Matrix |
multiply(Matrix matrix)
Calculates the product of this matrix and another. |
Vector |
multiply(Vector vector)
Calculates the product of this matrix and a vector. |
Matrix |
subtract(Matrix matrix)
Calculates the difference of this matrix and another. |
java.lang.String |
toString()
|
Matrix |
transpose()
Calculates the transpose of this matrix. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public double _e11
public double _e12
public double _e13
public double _e21
public double _e22
public double _e23
public double _e31
public double _e32
public double _e33
| Constructor Detail |
|---|
public Matrix()
public Matrix(double e11,
double e12,
double e13,
double e21,
double e22,
double e23,
double e31,
double e32,
double e33)
e11 - - element row 1, column 1e12 - - element row 1, column 2e13 - - element row 1, column 3e21 - - element row 2, column 1e22 - - element row 2, column 2e23 - - element row 2, column 3e31 - - element row 3, column 1e32 - - element row 3, column 2e33 - - element row 3, column 3| Method Detail |
|---|
public Matrix add(Matrix matrix)
matrix - - the other matrix
public Matrix clone()
clone in class java.lang.Objectpublic double determinant()
public Matrix divide(double scale)
scale - - the scale
public Matrix inverse()
public Matrix multiply(double scale)
scale - - the scale
public Matrix multiply(Matrix matrix)
matrix - - the other matrix
public Vector multiply(Vector vector)
vector - - the vector
public Matrix subtract(Matrix matrix)
matrix - - the other matrix
public java.lang.String toString()
toString in class java.lang.Objectpublic Matrix transpose()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||