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
ConstructorsModifierConstructorDescriptionprivateAnnotatedMatrix(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.Matrixclone()Returns a clone of this matrix.booleanCompares this matrix with the given object for equality.doublegetElement(int row, int column) Retrieves the value at the specified row and column of this matrix.intReturns the number of columns in this matrix.intReturns the number of rows in this matrix.inthashCode()Returns a hash code value for this matrix.static org.opengis.referencing.operation.Matrixindirect(org.opengis.referencing.operation.Matrix matrix, boolean intersect) Returns anAnnotatedMatrixassociates withPositionalAccuracyConstant.INDIRECT_SHIFT_APPLIED.booleanReturnstrueif this matrix is an identity matrix.voidsetElement(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 anAnnotatedMatrixassociates 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:
getNumRowin interfaceorg.opengis.referencing.operation.Matrix
-
getNumCol
public int getNumCol()Returns the number of columns in this matrix.- Specified by:
getNumColin interfaceorg.opengis.referencing.operation.Matrix
-
isIdentity
public boolean isIdentity()Returnstrueif this matrix is an identity matrix.- Specified by:
isIdentityin 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:
getElementin 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:
setElementin 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
-