sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1522697 - in /sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix: Matrix1.java Matrix3.java Matrix4.java MismatchedMatrixSizeException.java SingularMatrixException.java
Date Thu, 12 Sep 2013 19:22:49 GMT
Author: desruisseaux
Date: Thu Sep 12 19:22:48 2013
New Revision: 1522697

URL: http://svn.apache.org/r1522697
Log:
Matrix-related exception extends the coordinate operation exceptions,
because this matrix package is designed for use as CoordinateOperationStep.

Modified:
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix1.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix3.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix4.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

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix1.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix1.java?rev=1522697&r1=1522696&r2=1522697&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix1.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix1.java
[UTF-8] Thu Sep 12 19:22:48 2013
@@ -225,7 +225,7 @@ public final class Matrix1 extends Matri
      * {@inheritDoc}
      */
     @Override
-    public MatrixSIS inverse() {
+    public MatrixSIS inverse() throws SingularMatrixException {
         if (m00 == 0) {
             throw new SingularMatrixException();
         }

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix3.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix3.java?rev=1522697&r1=1522696&r2=1522697&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix3.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix3.java
[UTF-8] Thu Sep 12 19:22:48 2013
@@ -33,7 +33,7 @@ import org.apache.sis.math.MathFunctions
  * └             ┘</pre></blockquote>
  *
  * In some situations, this specialized matrix implementation may provide better accuracy
than the
- * generic implementation for matrix inversions and multiplications.
+ * generic implementation for matrix inversions.
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4 (derived from geotk-2.2)

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix4.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix4.java?rev=1522697&r1=1522696&r2=1522697&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix4.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix4.java
[UTF-8] Thu Sep 12 19:22:48 2013
@@ -34,7 +34,7 @@ import org.apache.sis.math.MathFunctions
  * └                 ┘</pre></blockquote>
  *
  * In some situations, this specialized matrix implementation may provide better accuracy
than the
- * generic implementation for matrix inversions and multiplications.
+ * generic implementation for matrix inversions.
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4 (derived from geotk-2.2)

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=1522697&r1=1522696&r2=1522697&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
Thu Sep 12 19:22:48 2013
@@ -16,16 +16,22 @@
  */
 package org.apache.sis.referencing.operation.matrix;
 
+import org.opengis.geometry.MismatchedDimensionException;
+
 
 /**
- * Thrown when two matrix can not be added or multiplied because the sizes do not match.
+ * Thrown when two matrices can not be added or multiplied because the sizes do not match.
+ *
+ * {@note This exception extends <code>MismatchedDimensionException</code> because
the matrices in this package
+ *        are used in <cite>Coordinate Operation Steps</cite>, in which case
a mismatched matrix size means that
+ *        the operation involves two Coordinate Reference Systems of incompatible dimensions.}
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.4
  * @version 0.4
  * @module
  */
-public class MismatchedMatrixSizeException extends IllegalArgumentException {
+public class MismatchedMatrixSizeException extends MismatchedDimensionException {
     /**
      * For cross-version compatibility.
      */
@@ -56,13 +62,4 @@ public class MismatchedMatrixSizeExcepti
     public MismatchedMatrixSizeException(final String message, final Throwable cause) {
         super(message, cause);
     }
-
-    /**
-     * Constructs a new exception with the specified cause.
-     *
-     * @param cause The cause, or {@code null} if none.
-     */
-    public MismatchedMatrixSizeException(final Throwable cause) {
-        super(cause);
-    }
 }

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=1522697&r1=1522696&r2=1522697&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
Thu Sep 12 19:22:48 2013
@@ -16,16 +16,22 @@
  */
 package org.apache.sis.referencing.operation.matrix;
 
+import org.opengis.referencing.operation.NoninvertibleTransformException;
+
 
 /**
  * Thrown when a matrix can not be inverted because it is singular.
  *
+ * {@note This exception extends <code>NoninvertibleTransformException</code>
because the matrices in this package
+ *        are used in <cite>Coordinate Operation Steps</cite>, in which case
a singular matrix means that the
+ *        operation is not invertible.}
+ *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.4
  * @version 0.4
  * @module
  */
-public class SingularMatrixException extends IllegalStateException {
+public class SingularMatrixException extends NoninvertibleTransformException {
     /**
      * For cross-version compatibility.
      */
@@ -56,13 +62,4 @@ public class SingularMatrixException ext
     public SingularMatrixException(final String message, final Throwable cause) {
         super(message, cause);
     }
-
-    /**
-     * Constructs a new exception with the specified cause.
-     *
-     * @param cause The cause, or {@code null} if none.
-     */
-    public SingularMatrixException(final Throwable cause) {
-        super(cause);
-    }
 }



Mime
View raw message