| org.geotools.referencing.operation.matrix.XMatrix
All known Subclasses: org.geotools.referencing.operation.matrix.Matrix4, org.geotools.referencing.operation.matrix.Matrix3, org.geotools.referencing.operation.matrix.GeneralMatrix, org.geotools.referencing.operation.matrix.Matrix1, org.geotools.referencing.operation.matrix.Matrix2,
XMatrix | public interface XMatrix extends Matrix(Code) | | A matrix capables to perform some matrix operations. The basic
Matrix interface
is basically just a two dimensional array of numbers. The
XMatrix interface add
and
capabilities.
It is used as a bridge across various matrix implementations in Java3D
(
javax.vecmath.Matrix3f ,
javax.vecmath.Matrix3d ,
javax.vecmath.Matrix4f ,
javax.vecmath.Matrix4d ,
javax.vecmath.GMatrix ).
since: 2.2 version: $Id: XMatrix.java 24493 2007-02-17 17:28:12Z desruisseaux $ author: Martin Desruisseaux author: Simone Giannecchini |
Method Summary | |
double | getElement(int row, int col) Returns the element at the specified index. | int | getNumCol() Returns the number of colmuns in this matrix. | int | getNumRow() Returns the number of rows in this matrix. | void | invert() Inverts this matrix in place. | boolean | isAffine() Returns
true if this matrix is an affine transform. | boolean | isIdentity() Returns
true if this matrix is an identity matrix. | boolean | isIdentity(double tolerance) Returns
true if this matrix is an identity matrix using the provided tolerance. | void | multiply(Matrix matrix) Sets the value of this matrix to the result of multiplying itself with the specified matrix.
In other words, performs
this =
this ×
matrix . | void | negate() Negates the value of this matrix:
this =
-this . | void | setElement(int row, int col, double value) Set the element at the specified index. | void | setIdentity() Sets this matrix to the identity matrix. | void | setZero() Sets all the values in this matrix to zero. | void | transpose() Sets the value of this matrix to its transpose. |
getElement | double getElement(int row, int col)(Code) | | Returns the element at the specified index.
|
getNumCol | int getNumCol()(Code) | | Returns the number of colmuns in this matrix.
|
getNumRow | int getNumRow()(Code) | | Returns the number of rows in this matrix.
|
invert | void invert() throws SingularMatrixException(Code) | | Inverts this matrix in place.
throws: SingularMatrixException - if this matrix is not invertible. |
isAffine | boolean isAffine()(Code) | | Returns
true if this matrix is an affine transform.
A transform is affine if the matrix is square and last row contains
only zeros, except in the last column which contains 1.
|
isIdentity | boolean isIdentity()(Code) | | Returns
true if this matrix is an identity matrix.
|
isIdentity | boolean isIdentity(double tolerance)(Code) | | Returns
true if this matrix is an identity matrix using the provided tolerance.
This method is equivalent to computing the difference between this matrix and an identity
matrix of identical size, and returning
true if and only if all differences are
smaller than or equal to
tolerance .
since: 2.4 |
multiply | void multiply(Matrix matrix)(Code) | | Sets the value of this matrix to the result of multiplying itself with the specified matrix.
In other words, performs
this =
this ×
matrix . In the context
of coordinate transformations, this is equivalent to
:
first transforms by the supplied transform and then transform the result by the original
transform.
|
negate | void negate()(Code) | | Negates the value of this matrix:
this =
-this .
|
setElement | void setElement(int row, int col, double value)(Code) | | Set the element at the specified index.
|
setIdentity | void setIdentity()(Code) | | Sets this matrix to the identity matrix.
|
setZero | void setZero()(Code) | | Sets all the values in this matrix to zero.
|
transpose | void transpose()(Code) | | Sets the value of this matrix to its transpose.
|
|
|