sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject [sis] branch geoapi-4.0 updated: Minor documentation adjustments.
Date Wed, 16 Sep 2020 21:17:42 GMT
This is an automated email from the ASF dual-hosted git repository.

desruisseaux pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git


The following commit(s) were added to refs/heads/geoapi-4.0 by this push:
     new 04a642a  Minor documentation adjustments.
04a642a is described below

commit 04a642a21f77fbee2720f5a5942a3812ed6d0416
Author: Martin Desruisseaux <martin.desruisseaux@geomatys.com>
AuthorDate: Wed Sep 16 23:17:17 2020 +0200

    Minor documentation adjustments.
---
 .../sis/internal/referencing/WraparoundTransform.java   | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/WraparoundTransform.java
b/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/WraparoundTransform.java
index 46a9287..cfbeb11 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/WraparoundTransform.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/WraparoundTransform.java
@@ -261,12 +261,7 @@ public final class WraparoundTransform extends AbstractMathTransform
implements
             final double[] t = new double[dimension];
             t[wraparoundDimension] = m;
             final MathTransform denormalize = MathTransforms.translation(t);
-            /*
-             * Do not use the 3-arguments method because we need to
-             * control the order in which concatenation is applied.
-             */
-            wraparound = MathTransforms.concatenate(denormalize.inverse(),
-                         MathTransforms.concatenate(wraparound, denormalize));
+            wraparound = MathTransforms.concatenate(denormalize.inverse(), wraparound, denormalize);
         }
         return MathTransforms.concatenate(tr, wraparound);
     }
@@ -509,13 +504,15 @@ public final class WraparoundTransform extends AbstractMathTransform
implements
         if (canMoveAfter != 0) {
             if (canMoveAfter != moveAll) {
                 /*
-                 * Create a matrix which will convert coordinates in all dimensions
-                 * that we can process before or after this `WraparoundTransform`.
-                 * We start with a copy and set to identity the rows that we can not move.
+                 * Create a matrix which will convert coordinates in all dimensions that
we can process
+                 * before or after this `WraparoundTransform`. We start with a copy and set
to identity
+                 * the rows that we can not move. Typically only one row will be set to identity,
which
+                 * makes the "start with a copy" strategy a good choice. Another reason is
that we want
+                 * to preserve the "double-double" storage.
                  */
                 matrix = Matrices.copy(matrix);
                 for (int j = matrix.getNumRow() - 1; --j >=0;) {
-                    if ((canMoveAfter & Numerics.bitmask(j)) == 0) {
+                    if ((canMoveAfter & Numerics.bitmask(j)) == 0) {    // True also
for dimensions ≥ 64.
                         for (int i=matrix.getNumCol(); --i >= 0;) {
                             matrix.setElement(j, i, (i == j) ? 1 : 0);
                         }


Mime
View raw message