sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1521437 - in /sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis: math/ referencing/operation/ referencing/operation/matrix/
Date Tue, 10 Sep 2013 11:34:37 GMT
Author: desruisseaux
Date: Tue Sep 10 11:34:37 2013
New Revision: 1521437

URL: http://svn.apache.org/r1521437
Log:
Moved org.apache.sis.math.matrix to org.apache.sis.referencing.operation.matrix for the following
reasons:

1) Make clear that this is not a general-purpose matrix package, but something designed for
the particular needs of referencing by coordinates.
2) Make clear that those classes are defined in the sis-referencing module rather than sis-utility.

Updated package-info.java javadoc for explaining some of the above.


Added:
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/
      - copied from r1521150, sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/math/matrix/
Removed:
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/math/
Modified:
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/MatrixSIS.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/MismatchedMatrixSizeException.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/SingularMatrixException.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/package-info.java

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/MatrixSIS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/MatrixSIS.java?rev=1521437&r1=1521150&r2=1521437&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/MatrixSIS.java
(original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/MatrixSIS.java
Tue Sep 10 11:34:37 2013
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.math.matrix;
+package org.apache.sis.referencing.operation.matrix;
 
 import org.opengis.referencing.operation.Matrix;
 import org.apache.sis.util.ComparisonMode;
@@ -45,10 +45,6 @@ public interface MatrixSIS extends Matri
      * A transform is affine if the matrix is square and its last row contains
      * only zeros, except in the last column which contains 1.
      *
-     * <p>In the two dimensional case, the matrix for an affine transform is:</p>
-     *
-     * <p><center><img src="doc-files/AffineTransform.png"></center></p>
-     *
      * @return {@code true} if this matrix is affine.
      */
     boolean isAffine();
@@ -61,6 +57,8 @@ public interface MatrixSIS extends Matri
      *
      * @param  tolerance The tolerance value, or 0 for a strict comparison.
      * @return {@code true} if this matrix is close to the identity matrix given the tolerance
threshold.
+     *
+     * @see java.awt.geom.AffineTransform#isIdentity()
      */
     boolean isIdentity(double tolerance);
 
@@ -68,6 +66,8 @@ public interface MatrixSIS extends Matri
      * Sets this matrix to zero everywhere except for the elements on the diagonal, which
are set to 1.
      * If this matrix contains more rows than columns, then the extra rows will contain only
zero values.
      * If this matrix contains more columns than rows, then the extra columns will contain
only zero values.
+     *
+     * @see java.awt.geom.AffineTransform#setToIdentity()
      */
     void setToIdentity();
 
@@ -148,12 +148,12 @@ public interface MatrixSIS extends Matri
      * objects must meet the following conditions, which depend on the {@code mode} argument:
      *
      * <ul>
-     *   <li><b>{@link ComparisonMode#STRICT STRICT}:</b> the two matrices
must be of the same class,
+     *   <li>{@link ComparisonMode#STRICT STRICT}: the two matrices must be of the
same class,
      *       have the same size and the same element values.</li>
-     *   <li><b>{@link ComparisonMode#BY_CONTRACT BY_CONTRACT} or {@link ComparisonMode#IGNORE_METADATA
-     *       IGNORE_METADATA}:</b> the two matrices must have the same size and the
same element values,
+     *   <li>{@link ComparisonMode#BY_CONTRACT BY_CONTRACT} or {@link ComparisonMode#IGNORE_METADATA
+     *       IGNORE_METADATA}: the two matrices must have the same size and the same element
values,
      *       but are not required to be the same implementation class (any {@link Matrix}
is okay).</li>
-     *   <li><b>{@link ComparisonMode#APPROXIMATIVE APPROXIMATIVE}:</b>
the two matrices must have
+     *   <li>{@link ComparisonMode#APPROXIMATIVE APPROXIMATIVE}: the two matrices must
have
      *       the same size, but the element values can differ up to some threshold. The threshold
      *       value is determined empirically and may change in future SIS versions.</li>
      * </ul>

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/MismatchedMatrixSizeException.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/MismatchedMatrixSizeException.java?rev=1521437&r1=1521150&r2=1521437&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/MismatchedMatrixSizeException.java
(original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/MismatchedMatrixSizeException.java
Tue Sep 10 11:34:37 2013
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.math.matrix;
+package org.apache.sis.referencing.operation.matrix;
 
 
 /**

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/SingularMatrixException.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/SingularMatrixException.java?rev=1521437&r1=1521150&r2=1521437&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/SingularMatrixException.java
(original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/SingularMatrixException.java
Tue Sep 10 11:34:37 2013
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.math.matrix;
+package org.apache.sis.referencing.operation.matrix;
 
 
 /**

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/package-info.java?rev=1521437&r1=1521150&r2=1521437&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/package-info.java
(original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/package-info.java
Tue Sep 10 11:34:37 2013
@@ -17,14 +17,27 @@
 
 /**
  * {@linkplain org.opengis.referencing.operation.Matrix} implementations tuned for spatio-temporal
referencing.
- * Matrix can be of arbitrary size, but the most common ones in the context of spatio-temporal
referencing are
- * not greater than 5×5. In the two dimensional case, the matrix for an affine transform
is:
+ * Matrices can be of arbitrary size, but the most common ones in the context of spatio-temporal
referencing are
+ * not greater than 5×5 (because the matrix size in affine transforms is the number of
dimensions + 1).
+ * This package differs from other matrix packages by the special treatment done for such
small matrices.
+ *
+ * <p><b>Example:</b> In the two dimensional case, an affine transform
from a map projection (units in metres)
+ * to the screen (units in pixels) can be performed by the following matrix multiplication:</p>
  *
  * <p><center><img src="doc-files/AffineTransform.png"></center></p>
  *
+ * {@section Related projects}
+ * This package is <strong>not</strong> designed for large matrices, and is rooted
in
+ * {@code org.apache.sis.referencing} for making clearer that this is not a general-purpose
library.
+ * For computational intensive calculations, better guarantees on numerical stability, sparse
matrices support
+ * and more, consider using an dedicated library like <a href="http://mikiobraun.github.io/jblas">jblas</a>
instead.
+ *
+ * <p>The <a href="http://java.net/projects/vecmath">Vecmath</a> library
shares similar goals than {@code MatrixSIS}.
+ * Like SIS, Vecmath is optimized for small matrices of interest for 2D and 3D graphics.</p>
+ *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4 (derived from geotk-2.2)
  * @version 0.4
  * @module
  */
-package org.apache.sis.math.matrix;
+package org.apache.sis.referencing.operation.matrix;



Mime
View raw message