Class AnnotatedMatrix
java.lang.Object
org.apache.sis.internal.referencing.AnnotatedMatrix
- All Implemented Interfaces:
Cloneable
,org.opengis.referencing.operation.Matrix
public final class AnnotatedMatrix
extends Object
implements org.opengis.referencing.operation.Matrix, Cloneable
A matrix augmented with annotation about transformation accuracy.
We use this class for passing additional information in methods that returns only a
Matrix
.- Since:
- 1.1
- Version:
- 1.1
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
AnnotatedMatrix
(org.opengis.referencing.operation.Matrix matrix, org.opengis.metadata.quality.PositionalAccuracy accuracy) Creates a new matrix wrapping the given matrix. -
Method Summary
Modifier and TypeMethodDescriptionorg.opengis.referencing.operation.Matrix
clone()
Returns a clone of this matrix.boolean
Compares this matrix with the given object for equality.double
getElement
(int row, int column) Retrieves the value at the specified row and column of this matrix.int
Returns the number of columns in this matrix.int
Returns the number of rows in this matrix.int
hashCode()
Returns a hash code value for this matrix.static org.opengis.referencing.operation.Matrix
indirect
(org.opengis.referencing.operation.Matrix matrix, boolean intersect) Returns anAnnotatedMatrix
associates withPositionalAccuracyConstant.INDIRECT_SHIFT_APPLIED
.boolean
Returnstrue
if this matrix is an identity matrix.void
setElement
(int row, int column, double value) Modifies the value at the specified row and column of this matrix.toString()
-
Field Details
-
matrix
private final org.opengis.referencing.operation.Matrix matrixThe matrix which contains the actual values. -
accuracy
public final org.opengis.metadata.quality.PositionalAccuracy accuracyAccuracy associated with this matrix.
-
-
Constructor Details
-
AnnotatedMatrix
private AnnotatedMatrix(org.opengis.referencing.operation.Matrix matrix, org.opengis.metadata.quality.PositionalAccuracy accuracy) Creates a new matrix wrapping the given matrix.- Parameters:
matrix
- the matrix which contains the actual values.accuracy
- accuracy associated with this matrix.
-
-
Method Details
-
indirect
public static org.opengis.referencing.operation.Matrix indirect(org.opengis.referencing.operation.Matrix matrix, boolean intersect) Returns anAnnotatedMatrix
associates withPositionalAccuracyConstant.INDIRECT_SHIFT_APPLIED
.- Parameters:
matrix
- the matrix to wrap.intersect
- whether an intersection has been found between the two datum.- Returns:
- the annotated matrix.
-
getNumRow
public int getNumRow()Returns the number of rows in this matrix.- Specified by:
getNumRow
in interfaceorg.opengis.referencing.operation.Matrix
-
getNumCol
public int getNumCol()Returns the number of columns in this matrix.- Specified by:
getNumCol
in interfaceorg.opengis.referencing.operation.Matrix
-
isIdentity
public boolean isIdentity()Returnstrue
if this matrix is an identity matrix.- Specified by:
isIdentity
in interfaceorg.opengis.referencing.operation.Matrix
-
getElement
public double getElement(int row, int column) Retrieves the value at the specified row and column of this matrix.- Specified by:
getElement
in interfaceorg.opengis.referencing.operation.Matrix
-
setElement
public void setElement(int row, int column, double value) Modifies the value at the specified row and column of this matrix.- Specified by:
setElement
in interfaceorg.opengis.referencing.operation.Matrix
-
clone
public org.opengis.referencing.operation.Matrix clone()Returns a clone of this matrix. -
equals
Compares this matrix with the given object for equality. -
hashCode
public int hashCode()Returns a hash code value for this matrix. -
toString
-