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
FieldsModifier and TypeFieldDescriptionstatic final Number[]A sentinel value forMatrices.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 forMatrices.create(int, int, Number[])meaning that we request an extended precision matrix with all elements initialized to zero. -
Method Summary
Modifier and TypeMethodDescriptiondouble[]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
A sentinel value forMatrices.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
A sentinel value forMatrices.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 theDoubleDouble.errorfor each value in the first half.- Returns:
- a copy of matrix elements, potentially followed by error terms.
-