sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1521661 - in /sis/branches/JDK7/core: sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/ sis-utility/src/main/java/org/apache/sis/util/resources/
Date Tue, 10 Sep 2013 21:42:15 GMT
Author: desruisseaux
Date: Tue Sep 10 21:42:14 2013
New Revision: 1521661

URL: http://svn.apache.org/r1521661
Log:
Initial port of Matrix3. Missing the 'inverse()' function, which will need to be adapted from
JAMA.

Added:
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix3.java
  (with props)
Modified:
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix2.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/MatrixSIS.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix2.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix2.java?rev=1521661&r1=1521660&r2=1521661&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix2.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix2.java
[UTF-8] Tue Sep 10 21:42:14 2013
@@ -21,7 +21,9 @@ import org.apache.sis.internal.util.Nume
 
 
 /**
- * A matrix of fixed {@value #SIZE}×{@value #SIZE} size.
+ * A matrix of fixed {@value #SIZE}×{@value #SIZE} size.
+ * This simple matrix is returned as a result of {@linkplain org.opengis.referencing.operation.MathTransform2D}
+ * derivative computation.
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4 (derived from geotk-2.2)
@@ -71,11 +73,11 @@ final class Matrix2 extends MatrixSIS {
     /**
      * Creates a new matrix initialized to the specified values.
      * The length of the given array must be 4 and the values in the same order than the
above constructor.
-     * The array length is not verified by this constructor, since it shall be verified by
{@link Matrices}.
      *
      * @param elements Elements of the matrix. Column indices vary fastest.
      */
-    Matrix2(final double[] elements) {
+    public Matrix2(final double[] elements) {
+        ensureLengthMatch(SIZE*SIZE, elements);
         m00 = elements[0];
         m01 = elements[1];
         m10 = elements[2];
@@ -117,23 +119,13 @@ final class Matrix2 extends MatrixSIS {
      */
     @Override
     public double getElement(final int row, final int column) {
-        switch (row) {
-            case 0: {
-                switch (column) {
-                    case 0: return m00;
-                    case 1: return m01;
-                }
-                break;
-            }
-            case 1: {
-                switch (column) {
-                    case 0: return m10;
-                    case 1: return m11;
-                }
-                break;
-            }
+        switch (row*SIZE + column) {
+            case 0:  return m00;
+            case 1:  return m01;
+            case 2:  return m10;
+            case 3:  return m11;
+            default: throw new IndexOutOfBoundsException();
         }
-        throw new IndexOutOfBoundsException();
     }
 
     /**
@@ -141,23 +133,13 @@ final class Matrix2 extends MatrixSIS {
      */
     @Override
     public void setElement(final int row, final int column, final double value) {
-        switch (row) {
-            case 0: {
-                switch (column) {
-                    case 0: m00 = value; return;
-                    case 1: m01 = value; return;
-                }
-                break;
-            }
-            case 1: {
-                switch (column) {
-                    case 0: m10 = value; return;
-                    case 1: m11 = value; return;
-                }
-                break;
-            }
+        switch (row*SIZE + column) {
+            case 0:  m00 = value; break;
+            case 1:  m01 = value; break;
+            case 2:  m10 = value; break;
+            case 3:  m11 = value; break;
+            default: throw new IndexOutOfBoundsException();
         }
-        throw new IndexOutOfBoundsException();
     }
 
     /**
@@ -181,14 +163,6 @@ final class Matrix2 extends MatrixSIS {
      * {@inheritDoc}
      */
     @Override
-    public boolean isIdentity(final double tolerance) {
-        return Matrices.isIdentity(this, tolerance);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
     public void setToIdentity() {
         m01 = m10 = 0;
         m00 = m11 = 1;
@@ -258,18 +232,10 @@ final class Matrix2 extends MatrixSIS {
             ensureSizeMatch(SIZE, matrix);
             k = new Matrix2(matrix);
         }
-        return new Matrix2(m00*k.m00 + m01*k.m10,
-                           m00*k.m01 + m01*k.m11,
-                           m10*k.m00 + m11*k.m10,
-                           m10*k.m01 + m11*k.m11);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean equals(final Matrix matrix, final double tolerance) {
-        return Matrices.equals(this, matrix, tolerance, false);
+        return new Matrix2(m00 * k.m00  +  m01 * k.m10,
+                           m00 * k.m01  +  m01 * k.m11,
+                           m10 * k.m00  +  m11 * k.m10,
+                           m10 * k.m01  +  m11 * k.m11);
     }
 
     /**

Added: 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=1521661&view=auto
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix3.java
(added)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix3.java
[UTF-8] Tue Sep 10 21:42:14 2013
@@ -0,0 +1,327 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.referencing.operation.matrix;
+
+import java.util.Arrays;
+import org.opengis.referencing.operation.Matrix;
+import org.apache.sis.internal.util.Numerics;
+import org.apache.sis.math.MathFunctions;
+
+
+/**
+ * A matrix of fixed {@value #SIZE}×{@value #SIZE} size. This specialized matrix provides
+ * better accuracy than {@link GeneralMatrix} for matrix inversion and multiplication.
+ *
+ * @author  Martin Desruisseaux (IRD, Geomatys)
+ * @since   0.4 (derived from geotk-2.2)
+ * @version 0.4
+ * @module
+ */
+final class Matrix3 extends MatrixSIS {
+    /**
+     * Serial number for inter-operability with different versions.
+     */
+    private static final long serialVersionUID = 8902061778871586611L;
+
+    /**
+     * The matrix size, which is {@value}.
+     */
+    public static final int SIZE = 3;
+
+     /** The first matrix element in the first row.   */ private double m00;
+     /** The second matrix element in the first row.  */ private double m01;
+     /** The third matrix element in the first row.   */ private double m02;
+     /** The first matrix element in the second row.  */ private double m10;
+     /** The second matrix element in the second row. */ private double m11;
+     /** The third matrix element in the second row.  */ private double m12;
+     /** The first matrix element in the third row.   */ private double m20;
+     /** The second matrix element in the third row.  */ private double m21;
+     /** The third matrix element in the third row.   */ private double m22;
+
+    /**
+     * Creates a new identity matrix.
+     */
+    public Matrix3() {
+        m00 = m11 = m22 = 1;
+    }
+
+    /**
+     * Creates a new matrix initialized to the specified values.
+     *
+     * @param m00 The first matrix element in the first row.
+     * @param m01 The second matrix element in the first row.
+     * @param m02 The third matrix element in the first row.
+     * @param m10 The first matrix element in the second row.
+     * @param m11 The second matrix element in the second row.
+     * @param m12 The third matrix element in the second row.
+     * @param m20 The first matrix element in the third row.
+     * @param m21 The second matrix element in the third row.
+     * @param m22 The third matrix element in the third row.
+     */
+    public Matrix3(double m00, double m01, double m02,
+                   double m10, double m11, double m12,
+                   double m20, double m21, double m22)
+    {
+        this.m00 = m00;
+        this.m01 = m01;
+        this.m02 = m02;
+        this.m10 = m10;
+        this.m11 = m11;
+        this.m12 = m12;
+        this.m20 = m20;
+        this.m21 = m21;
+        this.m22 = m22;
+    }
+
+    /**
+     * Creates a new matrix initialized to the specified values.
+     * The length of the given array must be 9 and the values in the same order than the
above constructor.
+     *
+     * @param elements Elements of the matrix. Column indices vary fastest.
+     */
+    public Matrix3(final double[] elements) {
+        ensureLengthMatch(SIZE*SIZE, elements);
+        m00 = elements[0];
+        m01 = elements[1];
+        m02 = elements[2];
+        m10 = elements[3];
+        m11 = elements[4];
+        m12 = elements[5];
+        m20 = elements[6];
+        m21 = elements[7];
+        m22 = elements[8];
+    }
+
+    /**
+     * Creates a new matrix initialized to the same value than the specified one.
+     * The specified matrix size must be {@value #SIZE}×{@value #SIZE}.
+     * This is not verified by this constructor, since it shall be verified by {@link Matrices}.
+     *
+     * @param matrix The matrix to copy.
+     */
+    Matrix3(final Matrix matrix) {
+        for (int j=0; j<SIZE; j++) {
+            for (int i=0; i<SIZE; i++) {
+                setElement(j,i, matrix.getElement(j,i));
+            }
+        }
+    }
+
+    /**
+     * Returns the number of rows in this matrix, which is always {@value #SIZE} in this
implementation.
+     */
+    @Override
+    public final int getNumRow() {
+        return SIZE;
+    }
+
+    /**
+     * Returns the number of columns in this matrix, which is always {@value #SIZE} in this
implementation.
+     */
+    @Override
+    public final int getNumCol() {
+        return SIZE;
+    }
+
+    /**
+     * Returns all elements in a flat, row-major, array.
+     */
+    private double[] getElements() {
+        return new double[] {
+            m00, m01, m02,
+            m10, m11, m12,
+            m20, m21, m22
+        };
+    }
+
+    /**
+     * Retrieves the value at the specified row and column of this matrix.
+     */
+    @Override
+    public double getElement(final int row, final int column) {
+        switch (row*SIZE + column) {
+            case 0:  return m00;
+            case 1:  return m01;
+            case 2:  return m02;
+            case 3:  return m10;
+            case 4:  return m11;
+            case 5:  return m12;
+            case 6:  return m20;
+            case 7:  return m21;
+            case 8:  return m22;
+            default: throw new IndexOutOfBoundsException();
+        }
+    }
+
+    /**
+     * Modifies the value at the specified row and column of this matrix.
+     */
+    @Override
+    public void setElement(final int row, final int column, final double value) {
+        switch (row*SIZE + column) {
+            case 0:  m00 = value; break;
+            case 1:  m01 = value; break;
+            case 2:  m02 = value; break;
+            case 3:  m10 = value; break;
+            case 4:  m11 = value; break;
+            case 5:  m12 = value; break;
+            case 6:  m20 = value; break;
+            case 7:  m21 = value; break;
+            case 8:  m22 = value; break;
+            default: throw new IndexOutOfBoundsException();
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public boolean isAffine() {
+        return m20 == 0 && m21 == 0 && m22 == 1;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public boolean isIdentity() {
+        return m00 == 1 && m01 == 0 && m02 == 0 &&
+               m10 == 0 && m11 == 1 && m12 == 0 &&
+               isAffine();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void setToIdentity() {
+        setToZero();
+        m00 = m11 = m22 = 1;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void setToZero() {
+        m00 = m01 = m02 = 0;
+        m10 = m11 = m12 = 0;
+        m20 = m21 = m22 = 0;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void negate() {
+        m00 = -m00;
+        m01 = -m01;
+        m02 = -m02;
+        m10 = -m10;
+        m11 = -m11;
+        m12 = -m12;
+        m20 = -m20;
+        m21 = -m21;
+        m22 = -m22;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public final void transpose() {
+        double swap;
+        swap = m01; m01 = m10; m10 = swap;
+        swap = m02; m02 = m20; m20 = swap;
+        swap = m12; m12 = m21; m21 = swap;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void normalizeColumns() {
+        double m;
+        final double[] v = new double[3];
+        v[0]=m00; v[1]=m10; v[2]=m20; m = MathFunctions.magnitude(v); m00 /= m; m10 /= m;
m20 /= m;
+        v[0]=m01; v[1]=m11; v[2]=m21; m = MathFunctions.magnitude(v); m01 /= m; m11 /= m;
m21 /= m;
+        v[0]=m02; v[1]=m12; v[2]=m22; m = MathFunctions.magnitude(v); m02 /= m; m12 /= m;
m22 /= m;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public MatrixSIS inverse() throws SingularMatrixException {
+        throw new UnsupportedOperationException(); // TODO
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public MatrixSIS multiply(final Matrix matrix) {
+        final Matrix3 k;
+        if (matrix instanceof Matrix3) {
+            k = (Matrix3) matrix;
+        } else {
+            ensureSizeMatch(SIZE, matrix);
+            k = new Matrix3(matrix);
+        }
+        return new Matrix3(m00 * k.m00  +  m01 * k.m10  +  m02 * k.m20,
+                           m00 * k.m01  +  m01 * k.m11  +  m02 * k.m21,
+                           m00 * k.m02  +  m01 * k.m12  +  m02 * k.m22,
+                           m10 * k.m00  +  m11 * k.m10  +  m12 * k.m20,
+                           m10 * k.m01  +  m11 * k.m11  +  m12 * k.m21,
+                           m10 * k.m02  +  m11 * k.m12  +  m12 * k.m22,
+                           m20 * k.m00  +  m21 * k.m10  +  m22 * k.m20,
+                           m20 * k.m01  +  m21 * k.m11  +  m22 * k.m21,
+                           m20 * k.m02  +  m21 * k.m12  +  m22 * k.m22);
+    }
+
+    /**
+     * Returns {@code true} if the specified object is of type {@code Matrix2} and
+     * all of the data members are equal to the corresponding data members in this matrix.
+     *
+     * @param object The object to compare with this matrix for equality.
+     * @return {@code true} if the given object is equal to this matrix.
+     */
+    @Override
+    public boolean equals(final Object object) {
+        if (object instanceof Matrix3) {
+            final Matrix3 that = (Matrix3) object;
+            return Numerics.equals(this.m00, that.m00) &&
+                   Numerics.equals(this.m01, that.m01) &&
+                   Numerics.equals(this.m02, that.m02) &&
+                   Numerics.equals(this.m10, that.m10) &&
+                   Numerics.equals(this.m11, that.m11) &&
+                   Numerics.equals(this.m12, that.m12) &&
+                   Numerics.equals(this.m20, that.m20) &&
+                   Numerics.equals(this.m21, that.m21) &&
+                   Numerics.equals(this.m22, that.m22);
+        }
+        return false;
+    }
+
+    /**
+     * Returns a hash code value based on the data values in this object.
+     */
+    @Override
+    public int hashCode() {
+        return Arrays.hashCode(getElements()) ^ (int) serialVersionUID;
+    }
+}

Propchange: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix3.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix3.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain;charset=UTF-8

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=1521661&r1=1521660&r2=1521661&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 21:42:14 2013
@@ -18,6 +18,7 @@ package org.apache.sis.referencing.opera
 
 import java.io.Serializable;
 import org.opengis.referencing.operation.Matrix;
+import org.apache.sis.util.ArgumentChecks;
 import org.apache.sis.util.ComparisonMode;
 import org.apache.sis.util.LenientComparable;
 import org.apache.sis.util.resources.Errors;
@@ -54,6 +55,18 @@ public abstract class MatrixSIS implemen
     }
 
     /**
+     * Ensures that the given array is non-null and has the expected length.
+     * This is a convenience method for subclasses constructors.
+     */
+    static void ensureLengthMatch(final int expected, final double[] elements) {
+        ArgumentChecks.ensureNonNull("elements", elements);
+        if (elements.length != expected) {
+            throw new IllegalArgumentException(Errors.format(
+                    Errors.Keys.UnexpectedArrayLength_2, expected, elements.length));
+        }
+    }
+
+    /**
      * Ensures that the given matrix is a square matrix having the given dimension.
      * This is a convenience method for subclasses.
      */
@@ -61,7 +74,9 @@ public abstract class MatrixSIS implemen
         final int numRow = matrix.getNumRow();
         final int numCol = matrix.getNumCol();
         if (numRow != size || numCol != size) {
-            throw new MismatchedMatrixSizeException(Errors.format(Errors.Keys.MismatchedMatrixSize_2,
numRow, numCol));
+            final Integer n = size;
+            throw new MismatchedMatrixSizeException(Errors.format(
+                    Errors.Keys.MismatchedMatrixSize_4, n, n, numRow, numCol));
         }
     }
 
@@ -76,6 +91,8 @@ public abstract class MatrixSIS implemen
 
     /**
      * Returns {@code true} if this matrix is an identity matrix.
+     * Invoking this method is equivalent to invoking <code>{@linkplain #isIdentity(double)
isIdentity}(0.0)</code>,
+     * except that it is potentially more efficient.
      *
      * @return {@code true} if this matrix is an identity matrix.
      *
@@ -96,13 +113,25 @@ public abstract class MatrixSIS implemen
      *
      * @see Matrices#isIdentity(Matrix, double)
      */
-    public abstract boolean isIdentity(double tolerance);
+    public boolean isIdentity(final double tolerance) {
+        return Matrices.isIdentity(this, tolerance);
+    }
 
     /**
      * 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.
      *
+     * {@section Use case}
+     * This method is often used together with {@link #isIdentity(double)} in order to workaround
rounding errors,
+     * like below:
+     *
+     * {@preformat
+     *     if (matrix.isIdentity(1E-10)) {
+     *         matrix.setToIdentity();
+     *     }
+     * }
+     *
      * @see #isIdentity()
      * @see java.awt.geom.AffineTransform#setToIdentity()
      */

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java?rev=1521661&r1=1521660&r2=1521661&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
[UTF-8] Tue Sep 10 21:42:14 2013
@@ -326,7 +326,7 @@ public final class Errors extends Indexe
         public static final int MismatchedCRS = 57;
 
         /**
-         * Mismatched object dimension: {0}D and {1}D.
+         * Mismatched object dimensions: {0}D and {1}D.
          */
         public static final int MismatchedDimension_2 = 60;
 
@@ -336,9 +336,9 @@ public final class Errors extends Indexe
         public static final int MismatchedDimension_3 = 58;
 
         /**
-         * Matrix can not be of size {0}×{1}.
+         * Mismatched matrix sizes: expected {0}×{1} but got {2}×{3}.
          */
-        public static final int MismatchedMatrixSize_2 = 118;
+        public static final int MismatchedMatrixSize_4 = 118;
 
         /**
          * This operation requires the “{0}” module.
@@ -536,6 +536,11 @@ public final class Errors extends Indexe
         public static final int UndefinedOrderingForElements_2 = 70;
 
         /**
+         * Expected an array of length {0}, but got {1}.
+         */
+        public static final int UnexpectedArrayLength_2 = 119;
+
+        /**
          * Unexpected change in ‘{0}’.
          */
         public static final int UnexpectedChange_1 = 56;

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties?rev=1521661&r1=1521660&r2=1521661&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
[ISO-8859-1] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
[ISO-8859-1] Tue Sep 10 21:42:14 2013
@@ -76,9 +76,9 @@ KeyCollision_1                  = A diff
 MandatoryAttribute_2            = Attribute \u201c{0}\u201d is mandatory for an object of
type \u2018{1}\u2019.
 MismatchedArrayLengths          = Mismatched array lengths.
 MismatchedCRS                   = The coordinate reference system must be the same for all
objects.
-MismatchedDimension_2           = Mismatched object dimension: {0}D and {1}D.
+MismatchedDimension_2           = Mismatched object dimensions: {0}D and {1}D.
 MismatchedDimension_3           = Argument \u2018{0}\u2019 has {2} dimension{2,choice,1#|2#s},
while {1} was expected.
-MismatchedMatrixSize_2          = Matrix can not be of size {0}\u00d7{1}.
+MismatchedMatrixSize_4          = Mismatched matrix sizes: expected {0}\u00d7{1} but got
{2}\u00d7{3}.
 MissingRequiredModule_1         = This operation requires the \u201c{0}\u201d module.
 MissingSchemeInURI              = Missing scheme in URI.
 MissingValueForOption_1         = Missing value for option \u201c{0}\u201d.
@@ -119,6 +119,7 @@ StreamIsForwardOnly_1           = Can no
 TooFewArguments_2               = Expected at least {0} argument{0,choice,1#|2#s}, but got
{1}.
 TooManyArguments_2              = Expected at most {0} argument{0,choice,1#|2#s}, but got
{1}.
 UndefinedOrderingForElements_2  = Ordering between \u201c{0}\u201d and \u201c{1}\u201d elements
is undefined.
+UnexpectedArrayLength_2         = Expected an array of length {0}, but got {1}.
 UnexpectedChange_1              = Unexpected change in \u2018{0}\u2019.
 UnexpectedEndOfFile_1           = Unexpected end of file while reading \u201c{0}\u201d.
 UnexpectedEndOfString_1         = More characters were expected at the end of \u201c{0}\u201d.

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties?rev=1521661&r1=1521660&r2=1521661&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
[ISO-8859-1] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
[ISO-8859-1] Tue Sep 10 21:42:14 2013
@@ -68,7 +68,7 @@ MismatchedArrayLengths          = Les di
 MismatchedCRS                   = Le syst\u00e8me de r\u00e9f\u00e9rence des coordonn\u00e9es
doit \u00eatre le m\u00eame pour tous les objets.
 MismatchedDimension_2           = Les dimensions des objets ({0}D et {1}D) ne concordent
pas.
 MismatchedDimension_3           = L\u2019argument \u2018{0}\u2019 a {2} dimension{2,choice,1#|2#s},
alors qu\u2019on en attendait {1}.
-MismatchedMatrixSize_2          = La matrice ne peut pas \u00eatre de taille {0}\u00d7{1}.
+MismatchedMatrixSize_4          = Une matrice de taille de {0}\u00d7{1} \u00e9tait attendue
mais la matrice donn\u00e9es est de taille {2}\u00d7{3}.
 MissingRequiredModule_1         = Cette op\u00e9ration requiert le module \u201c{0}\u201d.
 MissingSchemeInURI              = Il manque le sch\u00e9ma d\u2019URI.
 MissingValueForOption_1         = Aucune valeur n\u2019a \u00e9t\u00e9 d\u00e9finie pour
l\u2019option \u201c{0}\u201d.
@@ -108,6 +108,7 @@ StreamIsForwardOnly_1           = Ne peu
 TooFewArguments_2               = Au moins {0} argument{0,choice,1# \u00e9tait attendu|2#s
\u00e9taient attendus}, mais seulement {1} {1,choice,1#a \u00e9t\u00e9 sp\u00e9cifi\u00e9|2#ont
\u00e9t\u00e9 sp\u00e9cifi\u00e9s}.
 TooManyArguments_2              = Au plus {0} argument{0,choice,1# \u00e9tait attendu|2#s
\u00e9taient attendus}, mais {1} {1,choice,1#a \u00e9t\u00e9 sp\u00e9cifi\u00e9|2#ont \u00e9t\u00e9
sp\u00e9cifi\u00e9s}.
 UndefinedOrderingForElements_2  = L\u2019ordre entre les \u00e9l\u00e9ments \u201c{0}\u201d
et \u201c{1}\u201d n\u2019est pas d\u00e9fini.
+UnexpectedArrayLength_2         = Un tableau de longueur {0} \u00e9tait attendu, mais le
tableau re\u00e7u est de longueur {1}.
 UnexpectedChange_1              = Changement inattendu dans \u2018{0}\u2019.
 UnexpectedEndOfFile_1           = Fin de fichier inattendue lors de la lecture de \u201c{0}\u201d.
 UnexpectedEndOfString_1         = D\u2019autres caract\u00e8res \u00e9taient attendus \u00e0
la fin du texte \u201c{0}\u201d.



Mime
View raw message