Interface ExtendedPrecisionMatrix

All Superinterfaces:
org.opengis.referencing.operation.Matrix
All Known Implementing Classes:
AffineMatrix, GeneralMatrix, NonSquareMatrix, ProjectiveTransform, ProjectiveTransform2D, ScaleTransform, TranslationTransform, UnmodifiableMatrix

public interface ExtendedPrecisionMatrix extends org.opengis.referencing.operation.Matrix
A matrix capable to store extended precision elements. Apache SIS uses double-double arithmetic for extended precision, but we want to hide that implementation details from public API.
Since:
0.5
Version:
0.8
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Number[]
    A sentinel value for Matrices.create(int, int, Number[]) meaning that we request an extended precision matrix initialized to the identity (or diagonal) matrix.
    static final Number[]
    A sentinel value for Matrices.create(int, int, Number[]) meaning that we request an extended precision matrix with all elements initialized to zero.
  • Method Summary

    Modifier and Type
    Method
    Description
    double[]
    Returns a copy of all matrix elements, potentially followed by the error terms for extended-precision arithmetic.

    Methods inherited from interface org.opengis.referencing.operation.Matrix

    clone, getElement, getNumCol, getNumRow, isIdentity, setElement
  • Field Details

    • ZERO

      static final Number[] ZERO
      A sentinel value for Matrices.create(int, int, Number[]) meaning that we request an extended precision matrix with all elements initialized to zero. This is a non-public feature because we try to hide our extended-precision mechanism from the users.
    • IDENTITY

      static final Number[] IDENTITY
      A sentinel value for Matrices.create(int, int, Number[]) meaning that we request an extended precision matrix initialized to the identity (or diagonal) matrix. This is a non-public feature because we try to hide our extended-precision mechanism from the users.
  • Method Details

    • getExtendedElements

      double[] getExtendedElements()
      Returns a copy of all matrix elements, potentially followed by the error terms for extended-precision arithmetic. Matrix elements are returned in a flat, row-major (column indices vary fastest) array.

      In extended precision mode, the length of this array is actually twice the normal length. The first half contains DoubleDouble.value, and the second half contains the DoubleDouble.error for each value in the first half.

      Returns:
      a copy of matrix elements, potentially followed by error terms.