|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.referencing.operation.matrix.Matrix1
public class Matrix1
A matrix of fixed 1×1 size. This trivial matrix is returned as a result of MathTransform1D derivative computation.
Field Summary | |
---|---|
double |
m00
The only element in this matrix. |
static int |
SIZE
The matrix size, which is 1. |
Constructor Summary | |
---|---|
Matrix1()
Creates a new identity matrix. |
|
Matrix1(double m00)
Creates a new matrix initialized to the specified value. |
|
Matrix1(org.opengis.referencing.operation.Matrix matrix)
Creates a new matrix initialized to the same value than the specified one. |
Method Summary | |
---|---|
Matrix1 |
clone()
Returns a clone of this matrix. |
boolean |
equals(org.opengis.referencing.operation.Matrix matrix,
double tolerance)
Compares the element values regardless the object class. |
boolean |
equals(java.lang.Object object)
Returns true if the specified object is of type Matrix1 and
all of the data members are equal to the corresponding data members in this matrix. |
double |
getElement(int row,
int col)
Returns the element at the specified index. |
int |
getNumCol()
Returns the number of colmuns in this matrix, which is always 1 in this implementation. |
int |
getNumRow()
Returns the number of rows in this matrix, which is always 1 in this implementation. |
int |
hashCode()
Returns a hash code value based on the data values in this object. |
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(org.opengis.referencing.operation.Matrix matrix)
Sets the value of this matrix to the result of multiplying itself with the specified 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. |
java.lang.String |
toString()
Returns a string representation of this matrix. |
void |
transpose()
Sets the value of this matrix to its transpose. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public double m00
public static final int SIZE
Constructor Detail |
---|
public Matrix1()
public Matrix1(double m00)
public Matrix1(org.opengis.referencing.operation.Matrix matrix)
Method Detail |
---|
public final int getNumRow()
getNumRow
in interface XMatrix
getNumRow
in interface org.opengis.referencing.operation.Matrix
public final int getNumCol()
getNumCol
in interface XMatrix
getNumCol
in interface org.opengis.referencing.operation.Matrix
public final double getElement(int row, int col)
getElement
in interface XMatrix
getElement
in interface org.opengis.referencing.operation.Matrix
public final void setElement(int row, int col, double value)
setElement
in interface XMatrix
setElement
in interface org.opengis.referencing.operation.Matrix
public final void setZero()
setZero
in interface XMatrix
public final void setIdentity()
setIdentity
in interface XMatrix
public final boolean isIdentity()
true
if this matrix is an identity matrix.
isIdentity
in interface XMatrix
isIdentity
in interface org.opengis.referencing.operation.Matrix
public final boolean isIdentity(double tolerance)
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
.
isIdentity
in interface XMatrix
tolerance
- The tolerance value.
true
if this matrix is close enough to the identity matrix
given the tolerance value.public final boolean isAffine()
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.
isAffine
in interface XMatrix
true
if this matrix is affine.public final void negate()
this
= -this
.
negate
in interface XMatrix
public final void transpose()
transpose
in interface XMatrix
public final void invert()
invert
in interface XMatrix
public final void multiply(org.opengis.referencing.operation.Matrix matrix)
this
= this
× matrix
. In the context
of coordinate transformations, this is equivalent to
AffineTransform.concatenate
:
first transforms by the supplied transform and then transform the result by the original
transform.
multiply
in interface XMatrix
matrix
- The matrix to multiply to this matrix.public boolean equals(org.opengis.referencing.operation.Matrix matrix, double tolerance)
GMatrix.epsilonEquals(matrix,
tolerance)
. The method name is intentionally different in order to avoid
ambiguities at compile-time.
equals
in interface XMatrix
matrix
- The matrix to compare.tolerance
- The tolerance value.
true
if this matrix is close enough to the given matrix
given the tolerance value.public boolean equals(java.lang.Object object)
true
if the specified object is of type Matrix1
and
all of the data members are equal to the corresponding data members in this matrix.
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public Matrix1 clone()
clone
in interface org.opengis.referencing.operation.Matrix
clone
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |