commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r772119 [1/2] - in /commons/proper/math/trunk/src/java/org/apache/commons/math: ./ complex/ distribution/ fraction/ geometry/ linear/ ode/ random/ stat/ stat/descriptive/ stat/descriptive/moment/ stat/descriptive/rank/ stat/regression/ util/
Date Wed, 06 May 2009 09:43:30 GMT
Author: luc
Date: Wed May  6 09:43:28 2009
New Revision: 772119

URL: http://svn.apache.org/viewvc?rev=772119&view=rev
Log:
improved error messages

Added:
    commons/proper/math/trunk/src/java/org/apache/commons/math/linear/AnyMatrix.java   (with props)
Modified:
    commons/proper/math/trunk/src/java/org/apache/commons/math/MathRuntimeException.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/MessagesResources_fr.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/complex/ComplexFormat.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/complex/ComplexUtils.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/AbstractContinuousDistribution.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/AbstractDistribution.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/AbstractIntegerDistribution.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/BinomialDistributionImpl.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/CauchyDistributionImpl.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/ExponentialDistributionImpl.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/FDistributionImpl.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/GammaDistributionImpl.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/HypergeometricDistributionImpl.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/NormalDistributionImpl.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/PascalDistributionImpl.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/PoissonDistributionImpl.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/TDistributionImpl.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/WeibullDistributionImpl.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/fraction/Fraction.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/geometry/Rotation.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/geometry/Vector3DFormat.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/linear/AbstractRealMatrix.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/linear/BigMatrix.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/linear/BigMatrixImpl.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/linear/DenseRealMatrix.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/linear/FieldMatrix.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/linear/MatrixUtils.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/linear/RealMatrix.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/linear/RealMatrixImpl.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/linear/RealVectorFormat.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/linear/SparseRealMatrix.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/ode/ContinuousOutputModel.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/ode/NordsieckTransformer.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/random/AbstractRandomGenerator.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/random/EmpiricalDistributionImpl.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/random/RandomDataImpl.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/random/UncorrelatedRandomVectorGenerator.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/stat/Frequency.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/stat/StatUtils.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/stat/descriptive/AbstractStorelessUnivariateStatistic.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/stat/descriptive/AbstractUnivariateStatistic.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/stat/descriptive/DescriptiveStatistics.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/stat/descriptive/moment/Variance.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/stat/descriptive/rank/Percentile.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/stat/regression/AbstractMultipleLinearRegression.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/stat/regression/SimpleRegression.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/util/MathUtils.java

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/MathRuntimeException.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/MathRuntimeException.java?rev=772119&r1=772118&r2=772119&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/MathRuntimeException.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/MathRuntimeException.java Wed May  6 09:43:28 2009
@@ -294,6 +294,19 @@
     }
 
     /**
+     * Constructs a new <code>IllegalArgumentException</code> with specified nested
+     * <code>Throwable</code> root cause.
+     * @param rootCause the exception or error that caused this exception
+     * to be thrown.
+     * @return built exception
+     */
+    public static IllegalArgumentException createIllegalArgumentException(final Throwable rootCause) {
+        IllegalArgumentException iae = new IllegalArgumentException(rootCause.getLocalizedMessage());
+        iae.initCause(rootCause);
+        return iae;
+    }
+
+    /**
      * Constructs a new <code>IllegalStateException</code> with specified formatted detail message.
      * Message formatting is delegated to {@link java.text.MessageFormat}.
      * @param pattern format specifier

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/MessagesResources_fr.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/MessagesResources_fr.java?rev=772119&r1=772118&r2=772119&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/MessagesResources_fr.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/MessagesResources_fr.java Wed May  6 09:43:28 2009
@@ -46,11 +46,23 @@
   private static final Object[][] contents = {
 
     // org.apache.commons.math.util.MathUtils
+    { "must have n >= k for binomial coefficient (n,k), got n = {0}, k = {1}",
+      "n doit \u00eatre sup\u00e9rieur ou \u00e9gal \u00e0 k " +
+      "pour le coefficient du bin\u00f4me (n,k), or n = {0}, k = {1}" },
+    { "must have n >= 0 for binomial coefficient (n,k), got n = {0}",
+      "n doit \u00eatre positif pour le coefficient du bin\u00f4me (n,k), or n = {0}" },
+    { "must have n >= 0 for n!, got n = {0}",
+      "n doit \u00eatre positif pour le calcul de n!, or n = {0}" },
     { "overflow: gcd({0}, {1}) is 2^31",
       "d\u00e9passement de capacit\u00e9 : le PGCD de {0} et {1} vaut 2^31" },
     { "cannot raise an integral value to a negative power ({0}^{1})",
-      "impossible d''\u00e9lever une valeur enti\u00e8re \u00e0 une puissance n\u00e9gative ({0}^{1})" },
-        
+      "impossible d''\u00e9lever une valeur enti\u00e8re " +
+      "\u00e0 une puissance n\u00e9gative ({0}^{1})" },
+    { "invalid rounding method {0}, valid methods: {1} ({2}), {3} ({4})," +
+       " {5} ({6}), {7} ({8}), {9} ({10}), {11} ({12}), {13} ({14}), {15} ({16})",
+      "m\u00e9thode d''arondi {0} invalide, m\u00e9thodes valides : {1} ({2}), {3} ({4})," +
+       " {5} ({6}), {7} ({8}), {9} ({10}), {11} ({12}), {13} ({14}), {15} ({16})" },
+
     // org.apache.commons.math.FunctionEvaluationException
     { "evaluation failed for argument = {0}",
       "erreur d''\u00e9valuation pour l''argument {0}" },
@@ -77,6 +89,8 @@
     // org.apache.commons.math.optimization.LeastSquaresConverter
     // org.apache.commons.math.optimization.direct.DirectSearchOptimizer
     // org.apache.commons.math.optimization.general.AbstractLeastSquaresOptimizer
+    // org.apache.commons.math.ode.ContinuousOutputModel
+    // org.apache.commons.math.random.UncorrelatedRandomVectorGenerator
     { "dimension mismatch {0} != {1}",
       "dimensions incompatibles {0} != {1}" },
 
@@ -265,20 +279,58 @@
     // org.apache.commons.math.optimization.direct.DirectSearchOptimizer
     { "unexpected exception caught",
       "exception inattendue lev\u00e9e" },
+    { "propagation direction mismatch",
+      "directions de propagation incoh\u00e9rentes" },
+    { "{0} wide hole between models time ranges",
+      "trou de longueur {0} entre les domaines temporels des mod\u00e8les" },
 
     // org.apache.commons.math.optimization.direct.DirectSearchOptimizer
     { "none of the {0} start points lead to convergence",
       "aucun des {0} points de d\u00e9part n''aboutit \u00e0 une convergence"  },
 
+    // org.apache.commons.math.random.ValueServer
+    { "unknown mode {0}, known modes: {1} ({2}), {3} ({4}), {5} ({6}), {7} ({8}), {9} ({10}) and {11} ({12})",
+      "mode {0} inconnu, modes connus : {1} ({2}), {3} ({4}), {5} ({6}), {7} ({8}), {9} ({10}) et {11} ({12})" },
+    { "digest not initialized",
+      "mod\u00e8le empirique non initialis\u00e9" },
+
     // org.apache.commons.math.random.EmpiricalDistributionImpl
+    { "distribution not loaded",
+      "aucune distribution n''a \u00e9t\u00e9 charg\u00e9e" },
     { "no bin selected",
       "aucun compartiment s\u00e9lectionn\u00e9" },
+    { "input data comes from unsupported datasource: {0}, supported sources: {1}, {2}",
+      "les donn\u00e9es d''entr\u00e9e proviennent " +
+      "d''une source non support\u00e9e : {0}, sources support\u00e9es : {1}, {2}" },
+
+    // org.apache.commons.math.random.EmpiricalDistributionImpl
+    // org.apache.commons.math.random.ValueServer
+    { "URL {0} contains no data",
+      "l''adresse {0} ne contient aucune donn\u00e9e" },
+
+    // org.apache.commons.math.random.AbstractRandomGenerator
+    { "upper bound must be positive ({0})",
+      "la borne sup\u00e9rieure doit \u00eatre positive ({0})" },
+
+    // org.apache.commons.math.random.RandomDataImpl
+    { "length must be positive ({0})",
+      "la longueur doit \u00eatre positive ({0})" },
+    { "upper bound ({0}) must be greater than lower bound ({1})",
+      "la borne sup\u00e9rieure ({0}) doit \u00eatre sup\u00e9rieure" +
+      " \u00e0 la borne inf\u00e9rieure ({1})" },
+    { "permutation k ({0}) exceeds n ({1})",
+      "la permutation k ({0}) d\u00e9passe n ({1})" },
+    { "permutation k ({0}) must be positive",
+      "la permutation k ({0}) doit \u00eatre positive" },
+    { "sample size ({0}) exceeds collection size ({1})",
+      "la taille de l''\u00e9chantillon ({0}) d\u00e9passe la taille de la collection ({1})" },
 
     // org.apache.commons.math.linear.decomposition.EigenDecompositionImpl
     { "cannot solve degree {0} equation",
       "impossible de r\u00e9soudre une \u00e9quation de degr\u00e9 {0}" },
     { "eigen decomposition of assymetric matrices not supported yet",
-      "la d\u00e9composition en valeurs/vecteurs propres de matrices non sym\u00e9triques n''est pas encore disponible" },
+      "la d\u00e9composition en valeurs/vecteurs propres de matrices " +
+      "non sym\u00e9triques n''est pas encore disponible" },
 
     // org.apache.commons.math.linear.decomposition.NonSquareMatrixException
     { "a {0}x{1} matrix was provided instead of a square matrix",
@@ -332,25 +384,12 @@
       "une matrice doit comporter au moins une colonne" },
     { "some rows have length {0} while others have length {1}",
       "certaines lignes ont une longueur de {0} alors que d''autres ont une longueur de {1}" },
-    { "{0}x{1} and {2}x{3} matrices are not addition compatible",
-      "les dimensions {0}x{1} et {2}x{3} sont incompatibles pour l'addition matricielle" },
-    { "{0}x{1} and {2}x{3} matrices are not subtraction compatible",
-      "les dimensions {0}x{1} et {2}x{3} sont incompatibles pour la soustraction matricielle" },
-    { "{0}x{1} and {2}x{3} matrices are not multiplication compatible",
-      "les dimensions {0}x{1} et {2}x{3} sont incompatibles pour la multiplication matricielle" },
-
-    // org.apache.commons.math.linear.DenseRealMatrix
-    { "wrong array shape (block length = {0}, expected {1})",
-      "forme de tableau erron\u00e9e (bloc de longueur {0} au lieu des {1} attendus)" },
 
-    // org.apache.commons.math.linear.BigMatrixImpl
-    // org.apache.commons.math.linear.RealMatrixImpl
+    // org.apache.commons.math.linear.MatrixUtils
     { "row index {0} out of allowed range [{1}, {2}]",
       "index de ligne {0} hors de la plage autoris\u00e9e [{1}, {2}]" },
     { "column index {0} out of allowed range [{1}, {2}]",
       "index de colonne {0} hors de la plage autoris\u00e9e [{1}, {2}]" },
-    { "no entry at indices ({0}, {1}) in a {2}x{3} matrix",
-      "pas d''entr\u00e9e aux indices ({0}, {1}) dans une matrice {2}x{3}" },
     { "initial row {0} after final row {1}",
       "ligne initiale {0} apr\u00e8s la ligne finale {1}" },
     { "initial column {0} after final column {1}",
@@ -359,27 +398,48 @@
       "tableau des indices de lignes s\u00e9lectionn\u00e9es vide" },
     { "empty selected column index array",
       "tableau des indices de colonnes s\u00e9lectionn\u00e9es vide" },
+    { "{0}x{1} and {2}x{3} matrices are not addition compatible",
+      "les dimensions {0}x{1} et {2}x{3} sont incompatibles pour l'addition matricielle" },
+    { "{0}x{1} and {2}x{3} matrices are not subtraction compatible",
+      "les dimensions {0}x{1} et {2}x{3} sont incompatibles pour la soustraction matricielle" },
+    { "{0}x{1} and {2}x{3} matrices are not multiplication compatible",
+      "les dimensions {0}x{1} et {2}x{3} sont incompatibles pour la multiplication matricielle" },
 
-   // org.apache.commons.math.random.EmpiricalDistributionImpl
-   // org.apache.commons.math.random.ValueServer
-   { "URL {0} contains no data",
-     "l''adresse {0} ne contient aucune donn\u00e9e" },
+    // org.apache.commons.math.linear.DenseRealMatrix
+    { "wrong array shape (block length = {0}, expected {1})",
+      "forme de tableau erron\u00e9e (bloc de longueur {0} au lieu des {1} attendus)" },
 
-   // org.apache.commons.math.complex.Complex
-   { "cannot compute nth root for null or negative n: {0}",
+    // org.apache.commons.math.complex.Complex
+    { "cannot compute nth root for null or negative n: {0}",
      "impossible de calculer la racine ni\u00e8me pour n n\u00e9gatif ou nul : {0}" },
 
    // org.apache.commons.math.complex.ComplexFormat
    { "unparseable complex number: \"{0}\"",
      "\u00e9chec d''analyse du nombre complexe \"{0}\"" },
+   { "cannot format a {0} instance as a complex number",
+     "impossible de formater une instance de {0} comme un nombre complexe" },
+   { "empty string for imaginary character",
+     "cha\u00eene vide pour le caract\u00e8 imaginaire" },
+   { "null imaginary format",
+     "format imaginaire nul" },
+   { "null real format",
+     "format r\u00e9el nul" },
+
+   // org.apache.commons.math.complex.ComplexUtils
+   { "negative complex module {0}",
+     "module n\u00e9gatif ({0}) pour un nombre complexe" },
 
    // org.apache.commons.math.geometry.Vector3DFormat
    { "unparseable 3D vector: \"{0}\"",
      "\u00e9chec d''analyse du vecteur de dimension 3 \"{0}\"" },
+   { "cannot format a {0} instance as a 3D vector",
+     "impossible de formater une instance de {0} comme un vecteur de dimension 3" },
 
    // org.apache.commons.math.linear.RealVectorFormat
    { "unparseable real vector: \"{0}\"",
      "\u00e9chec d''analyse du vecteur r\u00e9el \"{0}\"" },
+   { "cannot format a {0} instance as a real vector",
+     "impossible de formater une instance de {0} comme un vecteur r\u00e9el" },
 
    // org.apache.commons.math.util.ResizableDoubleArray
    { "the index specified: {0} is larger than the current maximal index {1}",
@@ -480,10 +540,14 @@
      "d\u00e9passement de capacit\u00e9 pour le num\u00e9rateur apr\u00e8s multiplication : {0}" },
    { "the fraction to divide by must not be zero: {0}/{1}",
      "division par un nombre rationnel nul : {0}/{1}" },
+   { "null fraction",
+     "fraction nulle" },
 
    // org.apache.commons.math.geometry.Rotation
    { "zero norm for rotation axis",
      "norme nulle pour un axe de rotation" },
+   { "zero norm for rotation defining vector",
+     "norme nulle pour un axe de d\u00e9finition de rotation" },
 
    // org.apache.commons.math.geometry.Vector3D
    // org.apache.commons.math.linear.RealVectorImpl
@@ -502,20 +566,24 @@
    { "first {0} columns are not initialized yet",
      "les {0} premi\u00e8res colonnes ne sont pas encore initialis\u00e9es" },
 
-   // org.apache.commons.math.random.EmpiricalDistributionImpl
-   { "distribution not loaded",
-     "aucune distribution n''a \u00e9t\u00e9 charg\u00e9e" },
-
-   // org.apache.commons.math.random.ValueServer
-   { "unknown mode {0}, known modes: {1} ({2}), {3} ({4}), {5} ({6}), {7} ({8}), {9} ({10}) and {11} ({12})",
-     "mode {0} inconnu, modes connus : {1} ({2}), {3} ({4}), {5} ({6}), {7} ({8}), {9} ({10}) et {11} ({12})" },
-   { "digest not initialized",
-     "mod\u00e8le empirique non initialis\u00e9" },
+   // org.apache.commons.math.stat.Frequency
+   { "class ({0}) does not implement Comparable",
+     "la classe ({0}) n''implante pas l''interface Comparable" },
+   { "instance of class {0} not comparable to existing values",
+     "l''instance de la classe {0} n''est pas comparable aux valeurs existantes" },
+
+   // org.apache.commons.math.stat.StatUtils
+   { "input arrays must have the same positive length ({0} and {1})",
+     "les tableaux d''entr\u00e9e doivent avoir la m\u00eame taille positive ({0} et {1})" },
+   { "input arrays must have the same length and at least two elements ({0} and {1})",
+     "les tableaux d''entr\u00e9e doivent avoir la m\u00eame taille" +
+     " et au moins deux \u00e9l\u00e9ments ({0} et {1})" },
 
    // org.apache.commons.math.stat.correlation.Covariance
    { "arrays must have the same length and both must have at " +
      "least two elements. xArray has size {0}, yArray has {1} elements",
-     "les tableaux doivent avoir la m\u00eame taille et comporter au moins deux \u00e9l\u00e9ments. " +
+     "les tableaux doivent avoir la m\u00eame taille " +
+     "et comporter au moins deux \u00e9l\u00e9ments. " +
      "xArray a une taille de {0}, yArray a {1} \u00e9l\u00e9ments"},
    { "insufficient data: only {0} rows and {1} columns.",
      "donn\u00e9es insuffisantes : seulement {0} lignes et {1} colonnes." },
@@ -524,19 +592,127 @@
    { "covariance matrix is null",
      "la matrice de covariance est nulle" },
    { "invalid array dimensions. xArray has size {0}; yArray has {1} elements",
-     "dimensions de tableaux invalides. xArray a une taille de {0}, yArray a {1} \u00e9l\u00e9ments" },
+     "dimensions de tableaux invalides. xArray a une taille de {0}, " +
+     "yArray a {1} \u00e9l\u00e9ments" },
+
+   // org.apache.commons.math.stat.descriptive.DescriptiveStatistics
+   { "window size must be positive ({0})",
+     "la taille de la fen\u00eatre doit \u00eatre positive ({0})" },
+   { "percentile implementation {0} does not support setQuantile",
+     "l''implantation de pourcentage {0} ne dispose pas de la m\u00e9thode setQuantile" },
+   { "cannot access setQuantile method in percentile implementation {0}",
+     "acc\u00e8s impossible \u00e0 la m\u00e9thode setQuantile" +
+     " dans l''implantation de pourcentage {0}" },
+   { "out of bounds quantile value: {0}, must be in (0, 100]",
+     "valeur de quantile {0} hors bornes, doit \u00eatre dans l''intervalle ]0, 100]" },
+
+   // org.apache.commons.math.stat.descriptive.moment.Variance
+   // org.apache.commons.math.stat.descriptive.AbstractStorelessUnivariateStatistic
+   // org.apache.commons.math.stat.descriptive.AbstractUnivariateStatistic
+   { "input values array is null",
+     "le tableau des valeurs d''entr\u00e9es est nul" },
+
+   // org.apache.commons.math.stat.descriptive.AbstractUnivariateStatistic
+   { "start position cannot be negative ({0})",
+     "la position de d\u00e9part ne peut pas \u00eatre n\u00e9gative" },
+   { "length cannot be negative ({0})",
+     "la longueur ne peut pas \u00eatre n\u00e9gative" },
+   { "subarray ends after array end",
+     "le sous-tableau se termine apr\u00e8s la fin du tableau" },
 
    // org.apache.commons.math.stat.descriptive.moment.GeometricMean
    // org.apache.commons.math.stat.descriptive.MultivariateSummaryStatistics
    // org.apache.commons.math.stat.descriptive.SummaryStatistics
    { "{0} values have been added before statistic is configured",
-     "{0} valeurs ont \u00e9t\u00e9 ajout\u00e9es avant que la statistique ne soit configur\u00e9e" },
+     "{0} valeurs ont \u00e9t\u00e9 ajout\u00e9es " +
+     "avant que la statistique ne soit configur\u00e9e" },
 
    // org.apache.commons.math.stat.descriptive.moment.Kurtosis
    { "statistics constructed from external moments cannot be incremented",
-     "les statistiques bas\u00e9es sur des moments externes ne peuvent pas \u00eatre incr\u00e9ment\u00e9es" },
+     "les statistiques bas\u00e9es sur des moments externes " +
+     "ne peuvent pas \u00eatre incr\u00e9ment\u00e9es" },
    { "statistics constructed from external moments cannot be cleared",
-     "les statistiques bas\u00e9es sur des moments externes ne peuvent pas \u00eatre remises \u00e0 z\u00e9ro" },
+     "les statistiques bas\u00e9es sur des moments externes " +
+     "ne peuvent pas \u00eatre remises \u00e0 z\u00e9ro" },
+
+   // org.apache.commons.math.stat.Regression
+   { "out of bounds significance level {0}, must be in (0, 1)",
+     "niveau de signification {0} hors domaine, doit \u00eatre dans l''intervalle ]0, 1[" },
+
+   // org.apache.commons.math.distribution.AbstractContinuousDistribution
+   // org.apache.commons.math.distribution.AbstractIntegerDistribution
+   // org.apache.commons.math.distribution.ExponentialDistributionImpl
+   // org.apache.commons.math.distribution.BinomialDistributionImpl
+   // org.apache.commons.math.distribution.CauchyDistributionImpl
+   // org.apache.commons.math.distribution.PascalDistributionImpl
+   // org.apache.commons.math.distribution.WeibullDistributionImpl
+   { "{0} out of [{1}, {2}] range",
+     "{0} hors du domaine [{1}, {2}]" },
+
+   // org.apache.commons.math.distribution.AbstractDistribution
+   // org.apache.commons.math.distribution.AbstractIntegerDistribution
+   { "lower endpoint ({0}) must be less than or equal to upper endpoint ({1})",
+     "la borne inf\u00e9rieure ({0}) devrait \u00eatre inf\u00e9rieure " +
+     "ou \u00e9gale \u00e0 la borne sup\u00e9rieure ({1})" },
+
+   // org.apache.commons.math.distribution.BinomialDistributionImpl
+   { "number of trials must be non-negative ({0})",
+     "le nombre d''essais ne doit pas \u00eatre n\u00e9gatif ({0})" },
+
+   // org.apache.commons.math.distribution.ExponentialDistributionImpl
+   // org.apache.commons.math.random.RandomDataImpl
+   { "mean must be positive ({0})",
+     "la moyenne doit \u00eatre positive ({0})" },
+
+   // org.apache.commons.math.distribution.FDistributionImpl
+   // org.apache.commons.math.distribution.TDistributionImpl
+   { "degrees of freedom must be positive ({0})",
+     "les degr\u00e9s de libert\u00e9 doivent \u00eatre positifs ({0})" },
+
+   // org.apache.commons.math.distribution.GammaDistributionImpl
+   { "alpha must be positive ({0})",
+     "alpha doit \u00eatre positif ({0})" },
+   { "beta must be positive ({0})",
+     "beta doit \u00eatre positif ({0})" },
+
+   // org.apache.commons.math.distribution.HypergeometricDistributionImpl
+   { "number of successes ({0}) must be less than or equal to population size ({1})",
+     "le nombre de succ\u00e8s doit \u00eatre inf\u00e9rieur " +
+     "ou \u00e9gal \u00e0 la taille de la population ({1})" },
+   { "sample size ({0}) must be less than or equal to population size ({1})",
+     "la taille de l''\u00e9chantillon doit \u00eatre inf\u00e9rieure " +
+     "ou \u00e9gale \u00e0 la taille de la population ({1})" },
+   { "population size must be positive ({0})",
+     "la taille de la population doit \u00eatre positive ({0})" },
+
+   // org.apache.commons.math.distribution.HypergeometricDistributionImpl
+   // org.apache.commons.math.random.RandomDataImpl
+   { "sample size must be positive ({0})",
+     "la taille de l''\u00e9chantillon doit \u00eatre positive ({0})" },
+
+   // org.apache.commons.math.distribution.HypergeometricDistributionImpl
+   // org.apache.commons.math.distribution.PascalDistributionImpl
+   { "number of successes must be non-negative ({0})",
+     "le nombre de succ\u00e8s ne doit pas \u00eatre n\u00e9gatif ({0})" },
+
+   // org.apache.commons.math.distribution.NormalDistributionImpl
+   // org.apache.commons.math.random.RandomDataImpl
+   { "standard deviation must be positive ({0})",
+     "l''\u00e9cart type doit \u00eatre positif ({0})" },
+
+   // org.apache.commons.math.distribution.PoissonDistributionImpl
+   // org.apache.commons.math.random.RandomDataImpl
+   { "the Poisson mean must be positive ({0})",
+     "la moyenne de Poisson doit \u00eatre positive ({0})" },
+
+   // org.apache.commons.math.distribution.WeibullDistributionImpl
+   { "shape must be positive ({0})",
+     "le facteur de forme doit \u00eatre positif ({0})" },
+
+   // org.apache.commons.math.distribution.WeibullDistributionImpl
+   // org.apache.commons.math.distribution.CauchyDistributionImpl
+   { "scale must be positive ({0})",
+     "l''\u00e9chelle doit \u00eatre positive ({0})" },
 
    // org.apache.commons.math.distribution.ZipfDistributionImpl
    { "invalid number of elements {0} (must be positive)",
@@ -550,7 +726,8 @@
 
    // org.apache.commons.math.transform.FastFourierTransformer
    { "cannot compute 0-th root of unity, indefinite result",
-     "impossible de calculer la racine z\u00e9roi\u00e8me de l''unit\u00e9, r\u00e9sultat ind\u00e9fini" },
+     "impossible de calculer la racine z\u00e9roi\u00e8me de l''unit\u00e9, " +
+     "r\u00e9sultat ind\u00e9fini" },
    { "roots of unity have not been computed yet",
      "les racines de l''unit\u00e9 n''ont pas encore \u00e9t\u00e9 calcul\u00e9es" },
    { "out of range root of unity index {0} (must be in [{1};{2}])",

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/complex/ComplexFormat.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/complex/ComplexFormat.java?rev=772119&r1=772118&r2=772119&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/complex/ComplexFormat.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/complex/ComplexFormat.java Wed May  6 09:43:28 2009
@@ -192,7 +192,9 @@
             ret = format( new Complex(((Number)obj).doubleValue(), 0.0),
                 toAppendTo, pos);
         } else { 
-            throw new IllegalArgumentException("Cannot format given Object as a Complex");
+            throw MathRuntimeException.createIllegalArgumentException(
+                  "cannot format a {0} instance as a complex number",
+                  obj.getClass().getName());
         }
         
         return ret;
@@ -347,8 +349,8 @@
      */
     public void setImaginaryCharacter(String imaginaryCharacter) {
         if (imaginaryCharacter == null || imaginaryCharacter.length() == 0) {
-            throw new IllegalArgumentException(
-                "imaginaryCharacter must be a non-empty string.");
+            throw MathRuntimeException.createIllegalArgumentException(
+                  "empty string for imaginary character");
         }
         this.imaginaryCharacter = imaginaryCharacter;
     }
@@ -361,8 +363,8 @@
      */
     public void setImaginaryFormat(NumberFormat imaginaryFormat) {
         if (imaginaryFormat == null) {
-            throw new IllegalArgumentException(
-                "imaginaryFormat can not be null.");
+            throw MathRuntimeException.createIllegalArgumentException(
+                  "null imaginary format");
         }
         this.imaginaryFormat = imaginaryFormat;
     }
@@ -375,8 +377,8 @@
      */
     public void setRealFormat(NumberFormat realFormat) {
         if (realFormat == null) {
-            throw new IllegalArgumentException(
-                "realFormat can not be null.");
+            throw MathRuntimeException.createIllegalArgumentException(
+                  "null real format");
         }
         this.realFormat = realFormat;
     }

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/complex/ComplexUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/complex/ComplexUtils.java?rev=772119&r1=772118&r2=772119&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/complex/ComplexUtils.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/complex/ComplexUtils.java Wed May  6 09:43:28 2009
@@ -17,6 +17,8 @@
 
 package org.apache.commons.math.complex;
 
+import org.apache.commons.math.MathRuntimeException;
+
 /**
  * Static implementations of common 
  * {@link org.apache.commons.math.complex.Complex} utilities functions.
@@ -59,8 +61,8 @@
      */
     public static Complex polar2Complex(double r, double theta) {
         if (r < 0) {
-            throw new IllegalArgumentException
-                ("Complex modulus must not be negative");
+            throw MathRuntimeException.createIllegalArgumentException(
+                  "negative complex module {0}", r);
         }
         return new Complex(r * Math.cos(theta), r * Math.sin(theta));
     }

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/AbstractContinuousDistribution.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/AbstractContinuousDistribution.java?rev=772119&r1=772118&r2=772119&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/AbstractContinuousDistribution.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/AbstractContinuousDistribution.java Wed May  6 09:43:28 2009
@@ -21,6 +21,7 @@
 import org.apache.commons.math.ConvergenceException;
 import org.apache.commons.math.FunctionEvaluationException;
 import org.apache.commons.math.MathException;
+import org.apache.commons.math.MathRuntimeException;
 import org.apache.commons.math.analysis.UnivariateRealFunction;
 import org.apache.commons.math.analysis.solvers.UnivariateRealSolverUtils;
 
@@ -59,7 +60,8 @@
     public double inverseCumulativeProbability(final double p)
         throws MathException {
         if (p < 0.0 || p > 1.0) {
-            throw new IllegalArgumentException("p must be between 0.0 and 1.0, inclusive.");
+            throw MathRuntimeException.createIllegalArgumentException(
+                  "{0} out of [{1}, {2}] range", p, 0.0, 1.0);
         }
 
         // by default, do simple root finding using bracketing and default solver.

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/AbstractDistribution.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/AbstractDistribution.java?rev=772119&r1=772118&r2=772119&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/AbstractDistribution.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/AbstractDistribution.java Wed May  6 09:43:28 2009
@@ -19,6 +19,7 @@
 import java.io.Serializable;
 
 import org.apache.commons.math.MathException;
+import org.apache.commons.math.MathRuntimeException;
 
 /**
  * Base class for probability distributions.   
@@ -58,8 +59,9 @@
     public double cumulativeProbability(double x0, double x1)
         throws MathException {
         if (x0 > x1) {
-            throw new IllegalArgumentException
-            ("lower endpoint must be less than or equal to upper endpoint");
+            throw MathRuntimeException.createIllegalArgumentException(
+                  "lower endpoint ({0}) must be less than or equal to upper endpoint ({1})",
+                  x0, x1);
         }
         return cumulativeProbability(x1) - cumulativeProbability(x0);
     }

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/AbstractIntegerDistribution.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/AbstractIntegerDistribution.java?rev=772119&r1=772118&r2=772119&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/AbstractIntegerDistribution.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/AbstractIntegerDistribution.java Wed May  6 09:43:28 2009
@@ -19,6 +19,7 @@
 import java.io.Serializable;
 
 import org.apache.commons.math.MathException;
+import org.apache.commons.math.MathRuntimeException;
 
 
 /**
@@ -77,8 +78,9 @@
     public double cumulativeProbability(double x0, double x1)
         throws MathException {
         if (x0 > x1) {
-            throw new IllegalArgumentException
-            ("lower endpoint must be less than or equal to upper endpoint");
+            throw MathRuntimeException.createIllegalArgumentException(
+                  "lower endpoint ({0}) must be less than or equal to upper endpoint ({1})",
+                  x0, x1);
         }
         if (Math.floor(x0) < x0) {
             return cumulativeProbability(((int) Math.floor(x0)) + 1,
@@ -134,8 +136,9 @@
      */
     public double cumulativeProbability(int x0, int x1) throws MathException {
         if (x0 > x1) {
-            throw new IllegalArgumentException
-                ("lower endpoint must be less than or equal to upper endpoint");
+            throw MathRuntimeException.createIllegalArgumentException(
+                  "lower endpoint ({0}) must be less than or equal to upper endpoint ({1})",
+                  x0, x1);
         }
         return cumulativeProbability(x1) - cumulativeProbability(x0 - 1);
     }
@@ -153,8 +156,8 @@
      */
     public int inverseCumulativeProbability(final double p) throws MathException{
         if (p < 0.0 || p > 1.0) {
-            throw new IllegalArgumentException(
-                "p must be between 0 and 1.0 (inclusive)");
+            throw MathRuntimeException.createIllegalArgumentException(
+                  "{0} out of [{1}, {2}] range", p, 0.0, 1.0);
         }
         
         // by default, do simple bisection.

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/BinomialDistributionImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/BinomialDistributionImpl.java?rev=772119&r1=772118&r2=772119&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/BinomialDistributionImpl.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/BinomialDistributionImpl.java Wed May  6 09:43:28 2009
@@ -19,6 +19,7 @@
 import java.io.Serializable;
 
 import org.apache.commons.math.MathException;
+import org.apache.commons.math.MathRuntimeException;
 import org.apache.commons.math.special.Beta;
 import org.apache.commons.math.util.MathUtils;
 
@@ -76,7 +77,8 @@
      */
     public void setNumberOfTrials(int trials) {
         if (trials < 0) {
-            throw new IllegalArgumentException("number of trials must be non-negative.");
+            throw MathRuntimeException.createIllegalArgumentException(
+                  "number of trials must be non-negative ({0})", trials);
         }
         numberOfTrials = trials;
     }
@@ -89,7 +91,8 @@
      */
     public void setProbabilityOfSuccess(double p) {
         if (p < 0.0 || p > 1.0) {
-            throw new IllegalArgumentException("probability of success must be between 0.0 and 1.0, inclusive.");
+            throw MathRuntimeException.createIllegalArgumentException(
+                  "{0} out of [{1}, {2}] range", p, 0.0, 1.0);
         }
         probabilityOfSuccess = p;
     }

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/CauchyDistributionImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/CauchyDistributionImpl.java?rev=772119&r1=772118&r2=772119&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/CauchyDistributionImpl.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/CauchyDistributionImpl.java Wed May  6 09:43:28 2009
@@ -19,6 +19,8 @@
 
 import java.io.Serializable;
 
+import org.apache.commons.math.MathRuntimeException;
+
 /**
  * Default implementation of
  * {@link org.apache.commons.math.distribution.CauchyDistribution}.
@@ -98,8 +100,8 @@
     public double inverseCumulativeProbability(double p) {
         double ret;
         if (p < 0.0 || p > 1.0) {
-            throw new IllegalArgumentException
-                ("probability argument must be between 0 and 1 (inclusive)");
+            throw MathRuntimeException.createIllegalArgumentException(
+                  "{0} out of [{1}, {2}] range", p, 0.0, 1.0);
         } else if (p == 0) {
             ret = Double.NEGATIVE_INFINITY;
         } else  if (p == 1) {
@@ -125,8 +127,8 @@
      */
     public void setScale(double s) {
         if (s <= 0.0) {
-            throw new IllegalArgumentException(
-                "Scale must be positive.");
+            throw MathRuntimeException.createIllegalArgumentException(
+                  "scale must be positive ({0})", s);
         }       
         scale = s;
     }

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/ExponentialDistributionImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/ExponentialDistributionImpl.java?rev=772119&r1=772118&r2=772119&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/ExponentialDistributionImpl.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/ExponentialDistributionImpl.java Wed May  6 09:43:28 2009
@@ -19,6 +19,7 @@
 import java.io.Serializable;
 
 import org.apache.commons.math.MathException;
+import org.apache.commons.math.MathRuntimeException;
 
 /**
  * The default implementation of {@link ExponentialDistribution}.
@@ -50,7 +51,8 @@
      */
     public void setMean(double mean) {
         if (mean <= 0.0) {
-            throw new IllegalArgumentException("mean must be positive.");
+            throw MathRuntimeException.createIllegalArgumentException(
+                  "mean must be positive ({0})", mean);
         }
         this.mean = mean;
     }
@@ -118,8 +120,8 @@
         double ret;
         
         if (p < 0.0 || p > 1.0) {
-            throw new IllegalArgumentException
-                ("probability argument must be between 0 and 1 (inclusive)");
+            throw MathRuntimeException.createIllegalArgumentException(
+                  "{0} out of [{1}, {2}] range", p, 0.0, 1.0);
         } else if (p == 1.0) {
             ret = Double.POSITIVE_INFINITY;
         } else {

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/FDistributionImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/FDistributionImpl.java?rev=772119&r1=772118&r2=772119&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/FDistributionImpl.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/FDistributionImpl.java Wed May  6 09:43:28 2009
@@ -19,6 +19,7 @@
 import java.io.Serializable;
 
 import org.apache.commons.math.MathException;
+import org.apache.commons.math.MathRuntimeException;
 import org.apache.commons.math.special.Beta;
 
 /**
@@ -162,8 +163,9 @@
      */
     public void setNumeratorDegreesOfFreedom(double degreesOfFreedom) {
         if (degreesOfFreedom <= 0.0) {
-            throw new IllegalArgumentException(
-                "degrees of freedom must be positive.");
+            throw MathRuntimeException.createIllegalArgumentException(
+                  "degrees of freedom must be positive ({0})",
+                  degreesOfFreedom);
         }
         this.numeratorDegreesOfFreedom = degreesOfFreedom;
     }
@@ -184,8 +186,9 @@
      */
     public void setDenominatorDegreesOfFreedom(double degreesOfFreedom) {
         if (degreesOfFreedom <= 0.0) {
-            throw new IllegalArgumentException(
-                "degrees of freedom must be positive.");
+            throw MathRuntimeException.createIllegalArgumentException(
+                  "degrees of freedom must be positive ({0})",
+                  degreesOfFreedom);
         }
         this.denominatorDegreesOfFreedom = degreesOfFreedom;
     }

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/GammaDistributionImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/GammaDistributionImpl.java?rev=772119&r1=772118&r2=772119&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/GammaDistributionImpl.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/GammaDistributionImpl.java Wed May  6 09:43:28 2009
@@ -19,6 +19,7 @@
 import java.io.Serializable;
 
 import org.apache.commons.math.MathException;
+import org.apache.commons.math.MathRuntimeException;
 import org.apache.commons.math.special.Gamma;
 
 /**
@@ -110,7 +111,9 @@
      */
     public void setAlpha(double alpha) {
         if (alpha <= 0.0) {
-            throw new IllegalArgumentException("alpha must be positive");
+            throw MathRuntimeException.createIllegalArgumentException(
+                  "alpha must be positive ({0})",
+                  alpha);
         }
         this.alpha = alpha;
     }
@@ -130,7 +133,9 @@
      */
     public void setBeta(double beta) {
         if (beta <= 0.0) {
-            throw new IllegalArgumentException("beta must be positive");
+            throw MathRuntimeException.createIllegalArgumentException(
+                  "beta must be positive ({0})",
+                  beta);
         }
         this.beta = beta;
     }

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/HypergeometricDistributionImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/HypergeometricDistributionImpl.java?rev=772119&r1=772118&r2=772119&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/HypergeometricDistributionImpl.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/HypergeometricDistributionImpl.java Wed May  6 09:43:28 2009
@@ -19,6 +19,7 @@
 
 import java.io.Serializable;
 
+import org.apache.commons.math.MathRuntimeException;
 import org.apache.commons.math.util.MathUtils;
 
 /**
@@ -53,13 +54,14 @@
         int numberOfSuccesses, int sampleSize) {
         super();
         if (numberOfSuccesses > populationSize) {
-            throw new IllegalArgumentException(
-                "number of successes must be less than or equal to " +
-                "population size");
+            throw MathRuntimeException.createIllegalArgumentException(
+                "number of successes ({0}) must be less than or equal to population size ({1})",
+                numberOfSuccesses, populationSize);
         }
         if (sampleSize > populationSize) {
-            throw new IllegalArgumentException(
-            "sample size must be less than or equal to population size");
+            throw MathRuntimeException.createIllegalArgumentException(
+                  "sample size ({0}) must be less than or equal to population size ({1})",
+                  sampleSize, populationSize);
         }
         setPopulationSize(populationSize);
         setSampleSize(sampleSize);
@@ -226,8 +228,9 @@
      */
     public void setNumberOfSuccesses(int num) {
         if(num < 0){
-            throw new IllegalArgumentException(
-                "number of successes must be non-negative.");
+            throw MathRuntimeException.createIllegalArgumentException(
+                  "number of successes must be non-negative ({0})",
+                  num);
         }
         numberOfSuccesses = num;
     }
@@ -239,8 +242,9 @@
      */
     public void setPopulationSize(int size) {
         if(size <= 0){
-            throw new IllegalArgumentException(
-                "population size must be positive.");
+            throw MathRuntimeException.createIllegalArgumentException(
+                  "population size must be positive ({0})",
+                  size);
         }
         populationSize = size;
     }
@@ -252,8 +256,9 @@
      */
     public void setSampleSize(int size) {
         if (size < 0) {
-            throw new IllegalArgumentException(
-                "sample size must be non-negative.");
+            throw MathRuntimeException.createIllegalArgumentException(
+                  "sample size must be positive ({0})",
+                  size);
         }    
         sampleSize = size;
     }

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/NormalDistributionImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/NormalDistributionImpl.java?rev=772119&r1=772118&r2=772119&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/NormalDistributionImpl.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/NormalDistributionImpl.java Wed May  6 09:43:28 2009
@@ -20,6 +20,7 @@
 import java.io.Serializable;
 
 import org.apache.commons.math.MathException;
+import org.apache.commons.math.MathRuntimeException;
 import org.apache.commons.math.MaxIterationsExceededException;
 import org.apache.commons.math.special.Erf;
 
@@ -94,8 +95,9 @@
      */
     public void setStandardDeviation(double sd) {
         if (sd <= 0.0) {
-            throw new IllegalArgumentException(
-                "Standard deviation must be positive.");
+            throw MathRuntimeException.createIllegalArgumentException(
+                  "standard deviation must be positive ({0})",
+                  sd);
         }       
         standardDeviation = sd;
     }

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/PascalDistributionImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/PascalDistributionImpl.java?rev=772119&r1=772118&r2=772119&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/PascalDistributionImpl.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/PascalDistributionImpl.java Wed May  6 09:43:28 2009
@@ -19,6 +19,7 @@
 import java.io.Serializable;
 
 import org.apache.commons.math.MathException;
+import org.apache.commons.math.MathRuntimeException;
 import org.apache.commons.math.special.Beta;
 import org.apache.commons.math.util.MathUtils;
 
@@ -75,8 +76,9 @@
      */
     public void setNumberOfSuccesses(int successes) {
         if (successes < 0) {
-            throw new IllegalArgumentException(
-                "number of successes must be non-negative.");
+            throw MathRuntimeException.createIllegalArgumentException(
+                  "number of successes must be non-negative ({0})",
+                  successes);
         }
         numberOfSuccesses = successes;
     }
@@ -89,8 +91,8 @@
      */
     public void setProbabilityOfSuccess(double p) {
         if (p < 0.0 || p > 1.0) {
-            throw new IllegalArgumentException(
-                "probability of success must be between 0.0 and 1.0, inclusive.");
+            throw MathRuntimeException.createIllegalArgumentException(
+                  "{0} out of [{1}, {2}] range", p, 0.0, 1.0);
         }
         probabilityOfSuccess = p;
     }

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/PoissonDistributionImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/PoissonDistributionImpl.java?rev=772119&r1=772118&r2=772119&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/PoissonDistributionImpl.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/PoissonDistributionImpl.java Wed May  6 09:43:28 2009
@@ -19,6 +19,7 @@
 import java.io.Serializable;
 
 import org.apache.commons.math.MathException;
+import org.apache.commons.math.MathRuntimeException;
 import org.apache.commons.math.special.Gamma;
 import org.apache.commons.math.util.MathUtils;
 
@@ -88,8 +89,9 @@
      */
     public void setMean(double p) {
         if (p <= 0) {
-            throw new IllegalArgumentException(
-                    "The Poisson mean must be positive");
+            throw MathRuntimeException.createIllegalArgumentException(
+                  "the Poisson mean must be positive ({0})",
+                  p);
         }
         this.mean = p;
         normal.setMean(p);

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/TDistributionImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/TDistributionImpl.java?rev=772119&r1=772118&r2=772119&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/TDistributionImpl.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/TDistributionImpl.java Wed May  6 09:43:28 2009
@@ -19,6 +19,7 @@
 import java.io.Serializable;
 
 import org.apache.commons.math.MathException;
+import org.apache.commons.math.MathRuntimeException;
 import org.apache.commons.math.special.Beta;
 
 /**
@@ -52,7 +53,9 @@
      */
     public void setDegreesOfFreedom(double degreesOfFreedom) {
         if (degreesOfFreedom <= 0.0) {
-            throw new IllegalArgumentException("degrees of freedom must be positive.");
+            throw MathRuntimeException.createIllegalArgumentException(
+                  "degrees of freedom must be positive ({0})",
+                  degreesOfFreedom);
         }
         this.degreesOfFreedom = degreesOfFreedom;
     }

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/WeibullDistributionImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/WeibullDistributionImpl.java?rev=772119&r1=772118&r2=772119&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/WeibullDistributionImpl.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/WeibullDistributionImpl.java Wed May  6 09:43:28 2009
@@ -19,6 +19,8 @@
 
 import java.io.Serializable;
 
+import org.apache.commons.math.MathRuntimeException;
+
 /**
  * Default implementation of
  * {@link org.apache.commons.math.distribution.WeibullDistribution}.
@@ -97,8 +99,8 @@
     public double inverseCumulativeProbability(double p) {
         double ret;
         if (p < 0.0 || p > 1.0) {
-            throw new IllegalArgumentException
-                ("probability argument must be between 0 and 1 (inclusive)");
+            throw MathRuntimeException.createIllegalArgumentException(
+                  "{0} out of [{1}, {2}] range", p, 0.0, 1.0);
         } else if (p == 0) {
             ret = 0.0;
         } else  if (p == 1) {
@@ -115,8 +117,9 @@
      */
     public void setShape(double alpha) {
         if (alpha <= 0.0) {
-            throw new IllegalArgumentException(
-                "Shape must be positive.");
+            throw MathRuntimeException.createIllegalArgumentException(
+                  "shape must be positive ({0})",
+                  alpha);
         }       
         this.alpha = alpha;
     }
@@ -127,8 +130,9 @@
      */
     public void setScale(double beta) {
         if (beta <= 0.0) {
-            throw new IllegalArgumentException(
-                "Scale must be positive.");
+            throw MathRuntimeException.createIllegalArgumentException(
+                  "scale must be positive ({0})",
+                  beta);
         }       
         this.beta = beta;
     }

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/fraction/Fraction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/fraction/Fraction.java?rev=772119&r1=772118&r2=772119&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/fraction/Fraction.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/fraction/Fraction.java Wed May  6 09:43:28 2009
@@ -476,7 +476,7 @@
      */
     private Fraction addSub(Fraction fraction, boolean isAdd) {
         if (fraction == null) {
-            throw new IllegalArgumentException("The fraction must not be null");
+            throw MathRuntimeException.createIllegalArgumentException("null fraction");
         }
         // zero is identity for addition.
         if (numerator == 0) {
@@ -533,7 +533,7 @@
      */
     public Fraction multiply(Fraction fraction) {
         if (fraction == null) {
-            throw new IllegalArgumentException("The fraction must not be null");
+            throw MathRuntimeException.createIllegalArgumentException("null fraction");
         }
         if (numerator == 0 || fraction.numerator == 0) {
             return ZERO;
@@ -568,7 +568,7 @@
      */
     public Fraction divide(Fraction fraction) {
         if (fraction == null) {
-            throw new IllegalArgumentException("The fraction must not be null");
+            throw MathRuntimeException.createIllegalArgumentException("null fraction");
         }
         if (fraction.numerator == 0) {
             throw MathRuntimeException.createArithmeticException(

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/geometry/Rotation.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/geometry/Rotation.java?rev=772119&r1=772118&r2=772119&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/geometry/Rotation.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/geometry/Rotation.java Wed May  6 09:43:28 2009
@@ -300,7 +300,7 @@
   double v1v1 = Vector3D.dotProduct(v1, v1);
   double v2v2 = Vector3D.dotProduct(v2, v2);
   if ((u1u1 == 0) || (u2u2 == 0) || (v1v1 == 0) || (v2v2 == 0)) {
-    throw new IllegalArgumentException("zero norm for rotation defining vector");
+    throw MathRuntimeException.createIllegalArgumentException("zero norm for rotation defining vector");
   }
 
   double u1x = u1.getX();
@@ -431,7 +431,7 @@
 
     double normProduct = u.getNorm() * v.getNorm();
     if (normProduct == 0) {
-      throw new IllegalArgumentException("zero norm for rotation defining vector");
+        throw MathRuntimeException.createIllegalArgumentException("zero norm for rotation defining vector");
     }
 
     double dot = Vector3D.dotProduct(u, v);

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/geometry/Vector3DFormat.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/geometry/Vector3DFormat.java?rev=772119&r1=772118&r2=772119&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/geometry/Vector3DFormat.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/geometry/Vector3DFormat.java Wed May  6 09:43:28 2009
@@ -241,7 +241,8 @@
             return format( (Vector3D)obj, toAppendTo, pos);
         }
 
-        throw new IllegalArgumentException("Cannot format given Object as a Vector3D");
+        throw MathRuntimeException.createIllegalArgumentException("cannot format a {0} instance as a 3D vector",
+                                                                  obj.getClass().getName());
 
     }
 

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/linear/AbstractRealMatrix.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/linear/AbstractRealMatrix.java?rev=772119&r1=772118&r2=772119&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/linear/AbstractRealMatrix.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/linear/AbstractRealMatrix.java Wed May  6 09:43:28 2009
@@ -85,7 +85,7 @@
     public RealMatrix add(RealMatrix m) throws IllegalArgumentException {
 
         // safety check
-        checkAdditionCompatible(m);
+        MatrixUtils.checkAdditionCompatible(this, m);
 
         final int rowCount    = getRowDimension();
         final int columnCount = getColumnDimension();
@@ -104,7 +104,7 @@
     public RealMatrix subtract(final RealMatrix m) throws IllegalArgumentException {
 
         // safety check
-        checkSubtractionCompatible(m);
+        MatrixUtils.checkSubtractionCompatible(this, m);
 
         final int rowCount    = getRowDimension();
         final int columnCount = getColumnDimension();
@@ -156,7 +156,7 @@
         throws IllegalArgumentException {
 
         // safety check
-        checkMultiplicationCompatible(m);
+        MatrixUtils.checkMultiplicationCompatible(this, m);
 
         final int nRows = getRowDimension();
         final int nCols = m.getColumnDimension();
@@ -275,7 +275,7 @@
                                    final int startColumn, final int endColumn)
         throws MatrixIndexException {
 
-        checkSubMatrixIndex(startRow, endRow, startColumn, endColumn);
+        MatrixUtils.checkSubMatrixIndex(this, startRow, endRow, startColumn, endColumn);
 
         final RealMatrix subMatrix =
             createMatrix(endRow - startRow + 1, endColumn - startColumn + 1);
@@ -294,7 +294,7 @@
         throws MatrixIndexException {
 
         // safety checks
-        checkSubMatrixIndex(selectedRows, selectedColumns);
+        MatrixUtils.checkSubMatrixIndex(this, selectedRows, selectedColumns);
 
         // copy entries
         final RealMatrix subMatrix =
@@ -323,7 +323,7 @@
         throws MatrixIndexException, IllegalArgumentException {
 
         // safety checks
-        checkSubMatrixIndex(startRow, endRow, startColumn, endColumn);
+        MatrixUtils.checkSubMatrixIndex(this, startRow, endRow, startColumn, endColumn);
         final int rowsCount    = endRow + 1 - startRow;
         final int columnsCount = endColumn + 1 - startColumn;
         if ((destination.length < rowsCount) || (destination[0].length < columnsCount)) {
@@ -369,7 +369,7 @@
         throws MatrixIndexException, IllegalArgumentException {
 
         // safety checks
-        checkSubMatrixIndex(selectedRows, selectedColumns);
+        MatrixUtils.checkSubMatrixIndex(this, selectedRows, selectedColumns);
         if ((destination.length < selectedRows.length) ||
             (destination[0].length < selectedColumns.length)) {
             throw MathRuntimeException.createIllegalArgumentException(
@@ -410,10 +410,10 @@
             }
         }
 
-        checkRowIndex(row);
-        checkColumnIndex(column);
-        checkRowIndex(nRows + row - 1);
-        checkColumnIndex(nCols + column - 1);
+        MatrixUtils.checkRowIndex(this, row);
+        MatrixUtils.checkColumnIndex(this, column);
+        MatrixUtils.checkRowIndex(this, nRows + row - 1);
+        MatrixUtils.checkColumnIndex(this, nCols + column - 1);
 
         for (int i = 0; i < nRows; ++i) {
             for (int j = 0; j < nCols; ++j) {
@@ -429,7 +429,7 @@
     public RealMatrix getRowMatrix(final int row)
         throws MatrixIndexException {
 
-        checkRowIndex(row);
+        MatrixUtils.checkRowIndex(this, row);
         final int nCols = getColumnDimension();
         final RealMatrix out = createMatrix(1, nCols);
         for (int i = 0; i < nCols; ++i) {
@@ -444,7 +444,7 @@
     public void setRowMatrix(final int row, final RealMatrix matrix)
         throws MatrixIndexException, InvalidMatrixException {
 
-        checkRowIndex(row);
+        MatrixUtils.checkRowIndex(this, row);
         final int nCols = getColumnDimension();
         if ((matrix.getRowDimension() != 1) ||
             (matrix.getColumnDimension() != nCols)) {
@@ -462,7 +462,7 @@
     public RealMatrix getColumnMatrix(final int column)
         throws MatrixIndexException {
 
-        checkColumnIndex(column);
+        MatrixUtils.checkColumnIndex(this, column);
         final int nRows = getRowDimension();
         final RealMatrix out = createMatrix(nRows, 1);
         for (int i = 0; i < nRows; ++i) {
@@ -477,7 +477,7 @@
     public void setColumnMatrix(final int column, final RealMatrix matrix)
         throws MatrixIndexException, InvalidMatrixException {
 
-        checkColumnIndex(column);
+        MatrixUtils.checkColumnIndex(this, column);
         final int nRows = getRowDimension();
         if ((matrix.getRowDimension() != nRows) ||
             (matrix.getColumnDimension() != 1)) {
@@ -501,7 +501,7 @@
     public void setRowVector(final int row, final RealVector vector)
         throws MatrixIndexException, InvalidMatrixException {
 
-        checkRowIndex(row);
+        MatrixUtils.checkRowIndex(this, row);
         final int nCols = getColumnDimension();
         if (vector.getDimension() != nCols) {
             throw new InvalidMatrixException(
@@ -524,7 +524,7 @@
     public void setColumnVector(final int column, final RealVector vector)
         throws MatrixIndexException, InvalidMatrixException {
 
-        checkColumnIndex(column);
+        MatrixUtils.checkColumnIndex(this, column);
         final int nRows = getRowDimension();
         if (vector.getDimension() != nRows) {
             throw new InvalidMatrixException(
@@ -541,7 +541,7 @@
     public double[] getRow(final int row)
         throws MatrixIndexException {
 
-        checkRowIndex(row);
+        MatrixUtils.checkRowIndex(this, row);
         final int nCols = getColumnDimension();
         final double[] out = new double[nCols];
         for (int i = 0; i < nCols; ++i) {
@@ -556,7 +556,7 @@
     public void setRow(final int row, final double[] array)
         throws MatrixIndexException, InvalidMatrixException {
 
-        checkRowIndex(row);
+        MatrixUtils.checkRowIndex(this, row);
         final int nCols = getColumnDimension();
         if (array.length != nCols) {
             throw new InvalidMatrixException(
@@ -573,7 +573,7 @@
     public double[] getColumn(final int column)
         throws MatrixIndexException {
 
-        checkColumnIndex(column);
+        MatrixUtils.checkColumnIndex(this, column);
         final int nRows = getRowDimension();
         final double[] out = new double[nRows];
         for (int i = 0; i < nRows; ++i) {
@@ -588,7 +588,7 @@
     public void setColumn(final int column, final double[] array)
         throws MatrixIndexException, InvalidMatrixException {
 
-        checkColumnIndex(column);
+        MatrixUtils.checkColumnIndex(this, column);
         final int nRows = getRowDimension();
         if (array.length != nRows) {
             throw new InvalidMatrixException(
@@ -834,7 +834,7 @@
                                  final int startRow, final int endRow,
                                  final int startColumn, final int endColumn)
         throws MatrixIndexException, MatrixVisitorException {
-        checkSubMatrixIndex(startRow, endRow, startColumn, endColumn);
+        MatrixUtils.checkSubMatrixIndex(this, startRow, endRow, startColumn, endColumn);
         visitor.start(getRowDimension(), getColumnDimension(),
                       startRow, endRow, startColumn, endColumn);
         for (int row = startRow; row <= endRow; ++row) {
@@ -853,7 +853,7 @@
                                  final int startRow, final int endRow,
                                  final int startColumn, final int endColumn)
         throws MatrixIndexException, MatrixVisitorException {
-        checkSubMatrixIndex(startRow, endRow, startColumn, endColumn);
+        MatrixUtils.checkSubMatrixIndex(this, startRow, endRow, startColumn, endColumn);
         visitor.start(getRowDimension(), getColumnDimension(),
                       startRow, endRow, startColumn, endColumn);
         for (int row = startRow; row <= endRow; ++row) {
@@ -900,7 +900,7 @@
                                     final int startRow, final int endRow,
                                     final int startColumn, final int endColumn)
     throws MatrixIndexException, MatrixVisitorException {
-        checkSubMatrixIndex(startRow, endRow, startColumn, endColumn);
+        MatrixUtils.checkSubMatrixIndex(this, startRow, endRow, startColumn, endColumn);
         visitor.start(getRowDimension(), getColumnDimension(),
                       startRow, endRow, startColumn, endColumn);
         for (int column = startColumn; column <= endColumn; ++column) {
@@ -919,7 +919,7 @@
                                     final int startRow, final int endRow,
                                     final int startColumn, final int endColumn)
     throws MatrixIndexException, MatrixVisitorException {
-        checkSubMatrixIndex(startRow, endRow, startColumn, endColumn);
+        MatrixUtils.checkSubMatrixIndex(this, startRow, endRow, startColumn, endColumn);
         visitor.start(getRowDimension(), getColumnDimension(),
                       startRow, endRow, startColumn, endColumn);
         for (int column = startColumn; column <= endColumn; ++column) {
@@ -1090,126 +1090,4 @@
         return ret;
     }
 
-    /**
-     * Check if a row index is valid.
-     * @param row row index to check
-     * @exception MatrixIndexException if index is not valid
-     */
-    protected void checkRowIndex(final int row) {
-        if (row < 0 || row >= getRowDimension()) {
-            throw new MatrixIndexException("row index {0} out of allowed range [{1}, {2}]",
-                                           row, 0, getRowDimension() - 1);
-        }
-    }
-
-    /**
-     * Check if a column index is valid.
-     * @param column column index to check
-     * @exception MatrixIndexException if index is not valid
-     */
-    protected void checkColumnIndex(final int column)
-        throws MatrixIndexException {
-        if (column < 0 || column >= getColumnDimension()) {
-            throw new MatrixIndexException("column index {0} out of allowed range [{1}, {2}]",
-                                           column, 0, getColumnDimension() - 1);
-        }
-    }
-
-    /**
-     * Check if submatrix ranges indices are valid.
-     * Rows and columns are indicated counting from 0 to n-1.
-     *
-     * @param startRow Initial row index
-     * @param endRow Final row index
-     * @param startColumn Initial column index
-     * @param endColumn Final column index
-     * @exception MatrixIndexException  if the indices are not valid
-     */
-    protected void checkSubMatrixIndex(final int startRow, final int endRow,
-                                       final int startColumn, final int endColumn) {
-        checkRowIndex(startRow);
-        checkRowIndex(endRow);
-        if (startRow > endRow) {
-            throw new MatrixIndexException("initial row {0} after final row {1}",
-                                           startRow, endRow);
-        }
-
-        checkColumnIndex(startColumn);
-        checkColumnIndex(endColumn);
-        if (startColumn > endColumn) {
-            throw new MatrixIndexException("initial column {0} after final column {1}",
-                                           startColumn, endColumn);
-        }
-
-    
-    }
-
-    /**
-     * Check if submatrix ranges indices are valid.
-     * Rows and columns are indicated counting from 0 to n-1.
-     *
-     * @param selectedRows Array of row indices.
-     * @param selectedColumns Array of column indices.
-     * @exception MatrixIndexException if row or column selections are not valid
-     */
-    protected void checkSubMatrixIndex(final int[] selectedRows, final int[] selectedColumns) {
-        if (selectedRows.length * selectedColumns.length == 0) {
-            if (selectedRows.length == 0) {
-                throw new MatrixIndexException("empty selected row index array");
-            }
-            throw new MatrixIndexException("empty selected column index array");
-        }
-
-        for (final int row : selectedRows) {
-            checkRowIndex(row);
-        }
-        for (final int column : selectedColumns) {
-            checkColumnIndex(column);
-        }
-    }
-
-    /**
-     * Check if a matrix is addition compatible with the instance
-     * @param m matrix to check
-     * @exception IllegalArgumentException if matrix is not addition compatible with instance
-     */
-    protected void checkAdditionCompatible(final RealMatrix m) {
-        if ((getRowDimension()    != m.getRowDimension()) ||
-            (getColumnDimension() != m.getColumnDimension())) {
-            throw MathRuntimeException.createIllegalArgumentException(
-                    "{0}x{1} and {2}x{3} matrices are not addition compatible",
-                    getRowDimension(), getColumnDimension(),
-                    m.getRowDimension(), m.getColumnDimension());
-        }
-    }
-
-    /**
-     * Check if a matrix is subtraction compatible with the instance
-     * @param m matrix to check
-     * @exception IllegalArgumentException if matrix is not subtraction compatible with instance
-     */
-    protected void checkSubtractionCompatible(final RealMatrix m) {
-        if ((getRowDimension()    != m.getRowDimension()) ||
-            (getColumnDimension() != m.getColumnDimension())) {
-            throw MathRuntimeException.createIllegalArgumentException(
-                    "{0}x{1} and {2}x{3} matrices are not subtraction compatible",
-                    getRowDimension(), getColumnDimension(),
-                    m.getRowDimension(), m.getColumnDimension());
-        }
-    }
-
-    /**
-     * Check if a matrix is multiplication compatible with the instance
-     * @param m matrix to check
-     * @exception IllegalArgumentException if matrix is not multiplication compatible with instance
-     */
-    protected void checkMultiplicationCompatible(final RealMatrix m) {
-        if (getColumnDimension() != m.getRowDimension()) {
-            throw MathRuntimeException.createIllegalArgumentException(
-                    "{0}x{1} and {2}x{3} matrices are not multiplication compatible",
-                    getRowDimension(), getColumnDimension(),
-                    m.getRowDimension(), m.getColumnDimension());
-        }
-    }
-
 }

Added: commons/proper/math/trunk/src/java/org/apache/commons/math/linear/AnyMatrix.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/linear/AnyMatrix.java?rev=772119&view=auto
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/linear/AnyMatrix.java (added)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/linear/AnyMatrix.java Wed May  6 09:43:28 2009
@@ -0,0 +1,48 @@
+/*
+ * 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.commons.math.linear;
+
+
+/**
+ * Interface defining very basic matrix operations.
+ * @version $Revision$ $Date$
+ * @since 2.0
+ */
+public interface AnyMatrix {
+
+    /**
+     * Is this a square matrix?
+     * @return true if the matrix is square (rowDimension = columnDimension)
+     */
+    boolean isSquare();
+
+    /**
+     * Returns the number of rows in the matrix.
+     *
+     * @return rowDimension
+     */
+    int getRowDimension();
+
+    /**
+     * Returns the number of columns in the matrix.
+     *
+     * @return columnDimension
+     */
+    int getColumnDimension();
+
+}

Propchange: commons/proper/math/trunk/src/java/org/apache/commons/math/linear/AnyMatrix.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/math/trunk/src/java/org/apache/commons/math/linear/AnyMatrix.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/linear/BigMatrix.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/linear/BigMatrix.java?rev=772119&r1=772118&r2=772119&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/linear/BigMatrix.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/linear/BigMatrix.java Wed May  6 09:43:28 2009
@@ -31,7 +31,7 @@
  * org.apache.commons.math.util.BigReal} parameter
  */
 @Deprecated
-public interface BigMatrix {
+public interface BigMatrix extends AnyMatrix {
 
     /**
      * Returns a (deep) copy of this.
@@ -279,32 +279,6 @@
     BigDecimal getDeterminant() throws InvalidMatrixException;
     
     /**
-     * Is this a square matrix?
-     * @return true if the matrix is square (rowDimension = columnDimension)
-     */
-    boolean isSquare();
-    
-    /**
-     * Is this a singular matrix?
-     * @return true if the matrix is singular
-     */
-    boolean isSingular();
-    
-    /**
-     * Returns the number of rows in the matrix.
-     *
-     * @return rowDimension
-     */
-    int getRowDimension();
-    
-    /**
-     * Returns the number of columns in the matrix.
-     *
-     * @return columnDimension
-     */
-    int getColumnDimension();
-    
-    /**
      * Returns the <a href="http://mathworld.wolfram.com/MatrixTrace.html">
      * trace</a> of the matrix (the sum of the elements on the main diagonal).
      *



Mime
View raw message