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
    Modifier and Type
    Field
    Description
    final org.opengis.metadata.quality.PositionalAccuracy
    Accuracy associated with this matrix.
    private final org.opengis.referencing.operation.Matrix
    The matrix which contains the actual values.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    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 Type
    Method
    Description
    org.opengis.referencing.operation.Matrix
    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
    Returns a hash code value for this matrix.
    static org.opengis.referencing.operation.Matrix
    indirect(org.opengis.referencing.operation.Matrix matrix, boolean intersect)
    boolean
    Returns true 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.
     

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • matrix

      private final org.opengis.referencing.operation.Matrix matrix
      The matrix which contains the actual values.
    • accuracy

      public final org.opengis.metadata.quality.PositionalAccuracy accuracy
      Accuracy 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)
      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 interface org.opengis.referencing.operation.Matrix
    • getNumCol

      public int getNumCol()
      Returns the number of columns in this matrix.
      Specified by:
      getNumCol in interface org.opengis.referencing.operation.Matrix
    • isIdentity

      public boolean isIdentity()
      Returns true if this matrix is an identity matrix.
      Specified by:
      isIdentity in interface org.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 interface org.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 interface org.opengis.referencing.operation.Matrix
    • clone

      public org.opengis.referencing.operation.Matrix clone()
      Returns a clone of this matrix.
      Specified by:
      clone in interface org.opengis.referencing.operation.Matrix
      Overrides:
      clone in class Object
    • equals

      public boolean equals(Object obj)
      Compares this matrix with the given object for equality.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Returns a hash code value for this matrix.
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object