Return-Path: X-Original-To: apmail-commons-dev-archive@www.apache.org Delivered-To: apmail-commons-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0AD309DEF for ; Mon, 3 Oct 2011 08:15:17 +0000 (UTC) Received: (qmail 92024 invoked by uid 500); 3 Oct 2011 08:15:16 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 91941 invoked by uid 500); 3 Oct 2011 08:15:16 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 91932 invoked by uid 99); 3 Oct 2011 08:15:16 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Oct 2011 08:15:16 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of sebastien.brisard@gmail.com designates 209.85.220.171 as permitted sender) Received: from [209.85.220.171] (HELO mail-vx0-f171.google.com) (209.85.220.171) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Oct 2011 08:15:02 +0000 Received: by vcbfo13 with SMTP id fo13so3792552vcb.30 for ; Mon, 03 Oct 2011 01:14:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=aPNPW82JVNU94RZElnxIrHu3bRf7HrScBT5CA3gOmuA=; b=kBUmRvmy2nQlUAM/8vLwKOSHZlNjBega6LA71++Nfk7QAJngYcd+vtX5g7gomys7// 7JaJpb7Kv73V/z07Bd2KjhoRcxaCDFZJt7i8MX75J28WY3D4ljO29uQsxW1DhBv9o3bE CUSnyemGeRepT7ApUq8J/w60nlVUxh0mOnFEg= MIME-Version: 1.0 Received: by 10.52.116.241 with SMTP id jz17mr14094957vdb.181.1317629681589; Mon, 03 Oct 2011 01:14:41 -0700 (PDT) Sender: sebastien.brisard@gmail.com Received: by 10.52.183.129 with HTTP; Mon, 3 Oct 2011 01:14:41 -0700 (PDT) In-Reply-To: <90a8beac-3560-4935-af40-f7438fab9180@zimbra61-e11.priv.proxad.net> References: <20111003063322.916D523889DA@eris.apache.org> <90a8beac-3560-4935-af40-f7438fab9180@zimbra61-e11.priv.proxad.net> Date: Mon, 3 Oct 2011 10:14:41 +0200 X-Google-Sender-Auth: yYfieGLI3hYfnbchimrtg4Tce00 Message-ID: Subject: Re: svn commit: r1178306 - in /commons/proper/math/trunk/src: main/java/org/apache/commons/math/exception/util/ main/java/org/apache/commons/math/linear/ test/java/org/apache/commons/math/linear/ From: =?ISO-8859-1?Q?S=E9bastien_Brisard?= To: Commons Developers List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org 2011/10/3 : > Hi S=E9bastien, > > ----- Mail original ----- >> Author: celestin >> Date: Mon Oct =A03 06:33:21 2011 >> New Revision: 1178306 >> >> URL: http://svn.apache.org/viewvc?rev=3D1178306&view=3Drev >> Log: >> - Replaced LinearOperator with Operator in exception names in order >> to make them shorter (as discussed on the ML). >> - Created IllConditionedOperatorException. >> - Created SingularOperatorException (as discussed on the ML). >> >> Added: >> =A0 =A0 commons/proper/math/trunk/src/main/java/org/apache/commons/math/= linear/IllConditionedOperatorException.java >> =A0 =A0 =A0 (with props) >> =A0 =A0 commons/proper/math/trunk/src/main/java/org/apache/commons/math/= linear/NonPositiveDefiniteOperatorException.java >> =A0 =A0 =A0 - copied, changed from r1178288, >> =A0 =A0 =A0 commons/proper/math/trunk/src/main/java/org/apache/commons/m= ath/linear/NonPositiveDefiniteLinearOperatorException.java >> =A0 =A0 commons/proper/math/trunk/src/main/java/org/apache/commons/math/= linear/NonSelfAdjointOperatorException.java >> =A0 =A0 =A0 - copied, changed from r1178288, >> =A0 =A0 =A0 commons/proper/math/trunk/src/main/java/org/apache/commons/m= ath/linear/NonSelfAdjointLinearOperatorException.java >> =A0 =A0 commons/proper/math/trunk/src/main/java/org/apache/commons/math/= linear/NonSquareOperatorException.java >> =A0 =A0 =A0 - copied, changed from r1178288, >> =A0 =A0 =A0 commons/proper/math/trunk/src/main/java/org/apache/commons/m= ath/linear/NonSquareLinearOperatorException.java >> =A0 =A0 commons/proper/math/trunk/src/main/java/org/apache/commons/math/= linear/SingularOperatorException.java >> =A0 =A0 =A0 (with props) >> Removed: >> =A0 =A0 commons/proper/math/trunk/src/main/java/org/apache/commons/math/= linear/NonPositiveDefiniteLinearOperatorException.java >> =A0 =A0 commons/proper/math/trunk/src/main/java/org/apache/commons/math/= linear/NonSelfAdjointLinearOperatorException.java >> =A0 =A0 commons/proper/math/trunk/src/main/java/org/apache/commons/math/= linear/NonSquareLinearOperatorException.java >> Modified: >> =A0 =A0 commons/proper/math/trunk/src/main/java/org/apache/commons/math/= exception/util/LocalizedFormats.java > > > Could you also update the French translations in src/main/ressources/META= -INF/localization when you change some > parts of Localizedformats enumerate ? > Done in revision 1178328. > Thanks > > Luc > Thank *you* for reminding me. S=E9bastien >> =A0 =A0 commons/proper/math/trunk/src/main/java/org/apache/commons/math/= linear/ConjugateGradient.java >> =A0 =A0 commons/proper/math/trunk/src/main/java/org/apache/commons/math/= linear/IterativeLinearSolver.java >> =A0 =A0 commons/proper/math/trunk/src/main/java/org/apache/commons/math/= linear/JacobiPreconditioner.java >> =A0 =A0 commons/proper/math/trunk/src/main/java/org/apache/commons/math/= linear/PreconditionedIterativeLinearSolver.java >> =A0 =A0 commons/proper/math/trunk/src/test/java/org/apache/commons/math/= linear/ConjugateGradientTest.java >> >> Modified: >> commons/proper/math/trunk/src/main/java/org/apache/commons/math/exceptio= n/util/LocalizedFormats.java >> URL: >> http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org= /apache/commons/math/exception/util/LocalizedFormats.java?rev=3D1178306&r1= =3D1178305&r2=3D1178306&view=3Ddiff >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- >> commons/proper/math/trunk/src/main/java/org/apache/commons/math/exceptio= n/util/LocalizedFormats.java >> (original) >> +++ >> commons/proper/math/trunk/src/main/java/org/apache/commons/math/exceptio= n/util/LocalizedFormats.java >> Mon Oct =A03 06:33:21 2011 >> @@ -110,6 +110,7 @@ public enum LocalizedFormats implements >> =A0 =A0 =A0GCD_OVERFLOW_64_BITS("overflow: gcd({0}, {1}) is 2^63"), >> =A0 =A0 =A0HOLE_BETWEEN_MODELS_TIME_RANGES("{0} wide hole between models >> =A0 =A0 =A0time ranges"), >> =A0 =A0 =A0IDENTICAL_ABSCISSAS_DIVISION_BY_ZERO("identical abscissas x[{= 0}] >> =A0 =A0 =A0=3D=3D x[{1}] =3D=3D {2} cause division by zero"), >> + =A0 =A0ILL_CONDITIONED_OPERATOR("condition number {1} is too high "), >> =A0 =A0 =A0INDEX_LARGER_THAN_MAX("the index specified: {0} is larger tha= n >> =A0 =A0 =A0the current maximal index {1}"), >> =A0 =A0 =A0INDEX_NOT_POSITIVE("index ({0}) is not positive"), >> =A0 =A0 =A0INDEX_OUT_OF_RANGE("index {0} out of allowed range [{1}, {2}]= "), >> @@ -188,9 +189,9 @@ public enum LocalizedFormats implements >> =A0 =A0 =A0NOT_POSITIVE_COLUMNDIMENSION("invalid column dimension: {0} >> =A0 =A0 =A0(must be positive)"), >> =A0 =A0 =A0NOT_POSITIVE_DEFINITE_MATRIX("not positive definite matrix"),= /* >> =A0 =A0 =A0keep */ >> =A0 =A0 =A0NON_POSITIVE_DEFINITE_MATRIX("not positive definite matrix: >> =A0 =A0 =A0diagonal element at ({1},{1}) is smaller than {2} ({0})"), >> - =A0 =A0NON_POSITIVE_DEFINITE_LINEAR_OPERATOR("non positive definite >> linear operator"), /* keep */ >> - =A0 =A0NON_SELF_ADJOINT_LINEAR_OPERATOR("non self-adjoint linear >> operator"), /* keep */ >> - =A0 =A0NON_SQUARE_LINEAR_OPERATOR("non square ({0}x{1}) linear >> operator"), /* keep */ >> + =A0 =A0NON_POSITIVE_DEFINITE_OPERATOR("non positive definite linear >> operator"), /* keep */ >> + =A0 =A0NON_SELF_ADJOINT_OPERATOR("non self-adjoint linear operator"), >> /* keep */ >> + =A0 =A0NON_SQUARE_OPERATOR("non square ({0}x{1}) linear operator"), /* >> keep */ >> =A0 =A0 =A0DEGREES_OF_FREEDOM("degrees of freedom ({0})"), /* keep */ >> =A0 =A0 =A0NOT_POSITIVE_DEGREES_OF_FREEDOM("degrees of freedom must be >> =A0 =A0 =A0positive ({0})"), >> =A0 =A0 =A0NOT_POSITIVE_ELEMENT_AT_INDEX("element {0} is not positive: >> =A0 =A0 =A0{1}"), >> @@ -294,6 +295,7 @@ public enum LocalizedFormats implements >> =A0 =A0 =A0SIMPLEX_NEED_ONE_POINT("simplex must contain at least one >> =A0 =A0 =A0point"), >> =A0 =A0 =A0SIMPLE_MESSAGE("{0}"), >> =A0 =A0 =A0SINGULAR_MATRIX("matrix is singular"), /* keep */ >> + =A0 =A0SINGULAR_OPERATOR("operator is singular"), >> =A0 =A0 =A0SUBARRAY_ENDS_AFTER_ARRAY_END("subarray ends after array end"= ), >> =A0 =A0 =A0TOO_LARGE_CUTOFF_SINGULAR_VALUE("cutoff singular value is {0}= , >> =A0 =A0 =A0should be at most {1}"), >> =A0 =A0 =A0TOO_MANY_ELEMENTS_TO_DISCARD_FROM_ARRAY("cannot discard {0} >> =A0 =A0 =A0elements from a {1} elements array"), >> >> Modified: >> commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/C= onjugateGradient.java >> URL: >> http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org= /apache/commons/math/linear/ConjugateGradient.java?rev=3D1178306&r1=3D11783= 05&r2=3D1178306&view=3Ddiff >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- >> commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/C= onjugateGradient.java >> (original) >> +++ >> commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/C= onjugateGradient.java >> Mon Oct =A03 06:33:21 2011 >> @@ -47,7 +47,7 @@ import org.apache.commons.math.util.Iter >> =A0 *

Exception context

>> =A0 *

>> =A0 * Besides standard {@link DimensionMismatchException}, this class >> =A0 might throw >> - * {@link NonPositiveDefiniteLinearOperatorException} if the linear >> operator or >> + * {@link NonPositiveDefiniteOperatorException} if the linear >> operator or >> =A0 * the preconditioner are not positive definite. In this case, the >> =A0 * {@link ExceptionContext} provides some more information >> =A0 *

    >> @@ -166,7 +166,7 @@ public class ConjugateGradient >> =A0 =A0 =A0public RealVector solveInPlace(final RealLinearOperator a, >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = final >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = InvertibleRealLinearOperator m, >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = final RealVector b, final >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = RealVector x0) >> - =A0 =A0 =A0 =A0throws NullArgumentException, >> NonSquareLinearOperatorException, >> + =A0 =A0 =A0 =A0throws NullArgumentException, NonSquareOperatorExceptio= n, >> =A0 =A0 =A0 =A0 =A0DimensionMismatchException, MaxCountExceededException= { >> =A0 =A0 =A0 =A0 =A0checkParameters(a, m, b, x0); >> =A0 =A0 =A0 =A0 =A0final IterationManager manager =3D getIterationManage= r(); >> @@ -219,8 +219,8 @@ public class ConjugateGradient >> =A0 =A0 =A0 =A0 =A0 =A0 =A0} >> =A0 =A0 =A0 =A0 =A0 =A0 =A0final double rhoNext =3D r.dotProduct(z); >> =A0 =A0 =A0 =A0 =A0 =A0 =A0if (check && (rhoNext <=3D 0.)) { >> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0final NonPositiveDefiniteLinearOperator= Exception e; >> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0e =3D new >> NonPositiveDefiniteLinearOperatorException(); >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0final NonPositiveDefiniteOperatorExcept= ion e; >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0e =3D new NonPositiveDefiniteOperatorEx= ception(); >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0final ExceptionContext context =3D e.= getContext(); >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0context.setValue(OPERATOR, m); >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0context.setValue(VECTOR, r); >> @@ -235,8 +235,8 @@ public class ConjugateGradient >> =A0 =A0 =A0 =A0 =A0 =A0 =A0manager.incrementIterationCount(); >> =A0 =A0 =A0 =A0 =A0 =A0 =A0final double pq =3D p.dotProduct(q); >> =A0 =A0 =A0 =A0 =A0 =A0 =A0if (check && (pq <=3D 0.)) { >> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0final NonPositiveDefiniteLinearOperator= Exception e; >> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0e =3D new >> NonPositiveDefiniteLinearOperatorException(); >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0final NonPositiveDefiniteOperatorExcept= ion e; >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0e =3D new NonPositiveDefiniteOperatorEx= ception(); >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0final ExceptionContext context =3D e.= getContext(); >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0context.setValue(OPERATOR, a); >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0context.setValue(VECTOR, p); >> >> Added: >> commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/I= llConditionedOperatorException.java >> URL: >> http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org= /apache/commons/math/linear/IllConditionedOperatorException.java?rev=3D1178= 306&view=3Dauto >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- >> commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/I= llConditionedOperatorException.java >> (added) >> +++ >> commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/I= llConditionedOperatorException.java >> Mon Oct =A03 06:33:21 2011 >> @@ -0,0 +1,43 @@ >> +/* >> + * Licensed to the Apache Software Foundation (ASF) under one or >> more >> + * contributor license agreements. =A0See 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. =A0You may obtain a copy of the License at >> + * >> + * =A0 =A0 =A0http://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; >> + >> +import >> org.apache.commons.math.exception.MathIllegalArgumentException; >> +import org.apache.commons.math.exception.util.LocalizedFormats; >> + >> +/** >> + * An exception to be thrown when the condition number of a >> + * {@link RealLinearOperator} is too high. >> + * >> + * @version $Id$ >> + * @since 3.0 >> + */ >> +public class IllConditionedOperatorException >> + =A0 =A0extends MathIllegalArgumentException { >> + =A0 =A0/** Serializable version Id. */ >> + =A0 =A0private static final long serialVersionUID =3D >> -7883263944530490135L; >> + >> + =A0 =A0/** >> + =A0 =A0 * Creates a new instance of this class. >> + =A0 =A0 * >> + =A0 =A0 * @param cond An estimate of the condition number of the >> offending linear >> + =A0 =A0 * operator. >> + =A0 =A0 */ >> + =A0 =A0public IllConditionedOperatorException(final double cond) { >> + =A0 =A0 =A0 =A0super(LocalizedFormats.ILL_CONDITIONED_OPERATOR, cond); >> + =A0 =A0} >> +} >> >> Propchange: >> commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/I= llConditionedOperatorException.java >> ------------------------------------------------------------------------= ------ >> =A0 =A0 svn:eol-style =3D native >> >> Propchange: >> commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/I= llConditionedOperatorException.java >> ------------------------------------------------------------------------= ------ >> =A0 =A0 svn:keywords =3D Author Date Id Revision >> >> Modified: >> commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/I= terativeLinearSolver.java >> URL: >> http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org= /apache/commons/math/linear/IterativeLinearSolver.java?rev=3D1178306&r1=3D1= 178305&r2=3D1178306&view=3Ddiff >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- >> commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/I= terativeLinearSolver.java >> (original) >> +++ >> commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/I= terativeLinearSolver.java >> Mon Oct =A03 06:33:21 2011 >> @@ -67,20 +67,20 @@ public abstract class IterativeLinearSol >> =A0 =A0 =A0 * @param b Right-hand side vector. >> =A0 =A0 =A0 * @param x0 Initial guess of the solution. >> =A0 =A0 =A0 * @throws NullArgumentException if one of the parameters is >> =A0 =A0 =A0 {@code null}. >> - =A0 =A0 * @throws NonSquareLinearOperatorException if {@code a} is not >> square. >> + =A0 =A0 * @throws NonSquareOperatorException if {@code a} is not >> square. >> =A0 =A0 =A0 * @throws DimensionMismatchException if {@code b} or {@code = x0} >> =A0 =A0 =A0 have >> =A0 =A0 =A0 * dimensions inconsistent with {@code a}. >> =A0 =A0 =A0 */ >> =A0 =A0 =A0protected static void checkParameters(final RealLinearOperato= r >> =A0 =A0 =A0a, >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0final RealVector b, >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0final RealVector x0) >> - =A0 =A0 =A0 =A0throws NullArgumentException, >> NonSquareLinearOperatorException, >> + =A0 =A0 =A0 =A0throws NullArgumentException, NonSquareOperatorExceptio= n, >> =A0 =A0 =A0 =A0 =A0DimensionMismatchException { >> =A0 =A0 =A0 =A0 =A0MathUtils.checkNotNull(a); >> =A0 =A0 =A0 =A0 =A0MathUtils.checkNotNull(b); >> =A0 =A0 =A0 =A0 =A0MathUtils.checkNotNull(x0); >> =A0 =A0 =A0 =A0 =A0if (a.getRowDimension() !=3D a.getColumnDimension()) = { >> - =A0 =A0 =A0 =A0 =A0 =A0throw new >> NonSquareLinearOperatorException(a.getRowDimension(), >> + =A0 =A0 =A0 =A0 =A0 =A0throw new >> NonSquareOperatorException(a.getRowDimension(), >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 a.getColumnDimension()); >> =A0 =A0 =A0 =A0 =A0} >> =A0 =A0 =A0 =A0 =A0if (b.getDimension() !=3D a.getRowDimension()) { >> @@ -110,7 +110,7 @@ public abstract class IterativeLinearSol >> =A0 =A0 =A0 * @param b Right-hand side vector. >> =A0 =A0 =A0 * @return A new vector containing the solution. >> =A0 =A0 =A0 * @throws NullArgumentException if one of the parameters is >> =A0 =A0 =A0 {@code null}. >> - =A0 =A0 * @throws NonSquareLinearOperatorException if {@code a} is not >> square. >> + =A0 =A0 * @throws NonSquareOperatorException if {@code a} is not >> square. >> =A0 =A0 =A0 * @throws DimensionMismatchException if {@code b} has >> =A0 =A0 =A0 dimensions >> =A0 =A0 =A0 * inconsistent with {@code a}. >> =A0 =A0 =A0 * @throws MaxCountExceededException at exhaustion of the >> =A0 =A0 =A0 iteration count, >> @@ -118,7 +118,7 @@ public abstract class IterativeLinearSol >> =A0 =A0 =A0 * construction. >> =A0 =A0 =A0 */ >> =A0 =A0 =A0public RealVector solve(RealLinearOperator a, RealVector b) >> - =A0 =A0 =A0 =A0throws NullArgumentException, >> NonSquareLinearOperatorException, >> + =A0 =A0 =A0 =A0throws NullArgumentException, NonSquareOperatorExceptio= n, >> =A0 =A0 =A0 =A0 =A0DimensionMismatchException, MaxCountExceededException= { >> =A0 =A0 =A0 =A0 =A0MathUtils.checkNotNull(a); >> =A0 =A0 =A0 =A0 =A0final RealVector x =3D new >> =A0 =A0 =A0 =A0 =A0ArrayRealVector(a.getColumnDimension()); >> @@ -135,7 +135,7 @@ public abstract class IterativeLinearSol >> =A0 =A0 =A0 * @param x0 Initial guess of the solution. >> =A0 =A0 =A0 * @return A new vector containing the solution. >> =A0 =A0 =A0 * @throws NullArgumentException if one of the parameters is >> =A0 =A0 =A0 {@code null}. >> - =A0 =A0 * @throws NonSquareLinearOperatorException if {@code a} is not >> square. >> + =A0 =A0 * @throws NonSquareOperatorException if {@code a} is not >> square. >> =A0 =A0 =A0 * @throws DimensionMismatchException if {@code b} or {@code = x0} >> =A0 =A0 =A0 have >> =A0 =A0 =A0 * dimensions inconsistent with {@code a}. >> =A0 =A0 =A0 * @throws MaxCountExceededException at exhaustion of the >> =A0 =A0 =A0 iteration count, >> @@ -143,7 +143,7 @@ public abstract class IterativeLinearSol >> =A0 =A0 =A0 * construction. >> =A0 =A0 =A0 */ >> =A0 =A0 =A0public RealVector solve(RealLinearOperator a, RealVector b, >> =A0 =A0 =A0RealVector x0) >> - =A0 =A0 =A0 =A0throws NullArgumentException, >> NonSquareLinearOperatorException, >> + =A0 =A0 =A0 =A0throws NullArgumentException, NonSquareOperatorExceptio= n, >> =A0 =A0 =A0 =A0 =A0DimensionMismatchException, MaxCountExceededException= { >> =A0 =A0 =A0 =A0 =A0MathUtils.checkNotNull(x0); >> =A0 =A0 =A0 =A0 =A0return solveInPlace(a, b, x0.copy()); >> @@ -159,7 +159,7 @@ public abstract class IterativeLinearSol >> =A0 =A0 =A0 * @return A reference to {@code x0} (shallow copy) updated w= ith >> =A0 =A0 =A0 the >> =A0 =A0 =A0 * solution. >> =A0 =A0 =A0 * @throws NullArgumentException if one of the parameters is >> =A0 =A0 =A0 {@code null}. >> - =A0 =A0 * @throws NonSquareLinearOperatorException if {@code a} is not >> square. >> + =A0 =A0 * @throws NonSquareOperatorException if {@code a} is not >> square. >> =A0 =A0 =A0 * @throws DimensionMismatchException if {@code b} or {@code = x0} >> =A0 =A0 =A0 have >> =A0 =A0 =A0 * dimensions inconsistent with {@code a}. >> =A0 =A0 =A0 * @throws MaxCountExceededException at exhaustion of the >> =A0 =A0 =A0 iteration count, >> @@ -168,6 +168,6 @@ public abstract class IterativeLinearSol >> =A0 =A0 =A0 */ >> =A0 =A0 =A0public abstract RealVector solveInPlace(RealLinearOperator a, >> =A0 =A0 =A0RealVector b, >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0RealVector x0) >> - =A0 =A0 =A0 =A0throws NullArgumentException, >> NonSquareLinearOperatorException, >> + =A0 =A0 =A0 =A0throws NullArgumentException, NonSquareOperatorExceptio= n, >> =A0 =A0 =A0 =A0 =A0DimensionMismatchException, MaxCountExceededException= ; >> =A0} >> >> Modified: >> commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/J= acobiPreconditioner.java >> URL: >> http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org= /apache/commons/math/linear/JacobiPreconditioner.java?rev=3D1178306&r1=3D11= 78305&r2=3D1178306&view=3Ddiff >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- >> commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/J= acobiPreconditioner.java >> (original) >> +++ >> commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/J= acobiPreconditioner.java >> Mon Oct =A03 06:33:21 2011 >> @@ -50,13 +50,13 @@ public class JacobiPreconditioner >> =A0 =A0 =A0 * @param a Linear operator for which the preconditioner shou= ld >> =A0 =A0 =A0 be built. >> =A0 =A0 =A0 * @return Preconditioner made of the diagonal coefficients o= f >> =A0 =A0 =A0 the specified >> =A0 =A0 =A0 * =A0 =A0 =A0 =A0 linear operator. >> - =A0 =A0 * @throws NonSquareLinearOperatorException if {@code a} is not >> square. >> + =A0 =A0 * @throws NonSquareOperatorException if {@code a} is not >> square. >> =A0 =A0 =A0 */ >> =A0 =A0 =A0public static JacobiPreconditioner create(final >> =A0 =A0 =A0RealLinearOperator a) >> - =A0 =A0 =A0 =A0throws NonSquareLinearOperatorException { >> + =A0 =A0 =A0 =A0throws NonSquareOperatorException { >> =A0 =A0 =A0 =A0 =A0final int n =3D a.getColumnDimension(); >> =A0 =A0 =A0 =A0 =A0if (a.getRowDimension() !=3D n) { >> - =A0 =A0 =A0 =A0 =A0 =A0throw new >> NonSquareLinearOperatorException(a.getRowDimension(), n); >> + =A0 =A0 =A0 =A0 =A0 =A0throw new >> NonSquareOperatorException(a.getRowDimension(), n); >> =A0 =A0 =A0 =A0 =A0} >> =A0 =A0 =A0 =A0 =A0final double[] diag =3D new double[n]; >> =A0 =A0 =A0 =A0 =A0if (a instanceof AbstractRealMatrix) { >> >> Copied: >> commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/N= onPositiveDefiniteOperatorException.java >> (from r1178288, >> commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/N= onPositiveDefiniteLinearOperatorException.java) >> URL: >> http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org= /apache/commons/math/linear/NonPositiveDefiniteOperatorException.java?p2=3D= commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/NonP= ositiveDefiniteOperatorException.java&p1=3Dcommons/proper/math/trunk/src/ma= in/java/org/apache/commons/math/linear/NonPositiveDefiniteLinearOperatorExc= eption.java&r1=3D1178288&r2=3D1178306&rev=3D1178306&view=3Ddiff >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- >> commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/N= onPositiveDefiniteLinearOperatorException.java >> (original) >> +++ >> commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/N= onPositiveDefiniteOperatorException.java >> Mon Oct =A03 06:33:21 2011 >> @@ -32,10 +32,13 @@ import org.apache.commons.math.exception >> =A0 * @version $Id$ >> =A0 * @since 3.0 >> =A0 */ >> -public class NonPositiveDefiniteLinearOperatorException >> +public class NonPositiveDefiniteOperatorException >> =A0 =A0 =A0extends MathIllegalArgumentException { >> + =A0 =A0/** Serializable version Id. */ >> + =A0 =A0private static final long serialVersionUID =3D >> 917034489420549847L; >> + >> =A0 =A0 =A0/** Creates a new instance of this class. */ >> - =A0 =A0public NonPositiveDefiniteLinearOperatorException() { >> - >> =A0 =A0 =A0 =A0super(LocalizedFormats.NON_POSITIVE_DEFINITE_LINEAR_OPERA= TOR); >> + =A0 =A0public NonPositiveDefiniteOperatorException() { >> + =A0 =A0 =A0 =A0super(LocalizedFormats.NON_POSITIVE_DEFINITE_OPERATOR); >> =A0 =A0 =A0} >> =A0} >> >> Copied: >> commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/N= onSelfAdjointOperatorException.java >> (from r1178288, >> commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/N= onSelfAdjointLinearOperatorException.java) >> URL: >> http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org= /apache/commons/math/linear/NonSelfAdjointOperatorException.java?p2=3Dcommo= ns/proper/math/trunk/src/main/java/org/apache/commons/math/linear/NonSelfAd= jointOperatorException.java&p1=3Dcommons/proper/math/trunk/src/main/java/or= g/apache/commons/math/linear/NonSelfAdjointLinearOperatorException.java&r1= =3D1178288&r2=3D1178306&rev=3D1178306&view=3Ddiff >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- >> commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/N= onSelfAdjointLinearOperatorException.java >> (original) >> +++ >> commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/N= onSelfAdjointOperatorException.java >> Mon Oct =A03 06:33:21 2011 >> @@ -35,11 +35,13 @@ import org.apache.commons.math.exception >> =A0 * @version $Id$ >> =A0 * @since 3.0 >> =A0 */ >> -public class NonSelfAdjointLinearOperatorException >> +public class NonSelfAdjointOperatorException >> =A0 =A0 =A0extends MathIllegalArgumentException { >> + =A0 =A0/** Serializable version Id. */ >> + =A0 =A0private static final long serialVersionUID =3D >> 1784999305030258247L; >> >> =A0 =A0 =A0/** Creates a new instance of this class. */ >> - =A0 =A0public NonSelfAdjointLinearOperatorException() { >> - =A0 =A0 =A0 =A0super(LocalizedFormats.NON_SELF_ADJOINT_LINEAR_OPERATOR= ); >> + =A0 =A0public NonSelfAdjointOperatorException() { >> + =A0 =A0 =A0 =A0super(LocalizedFormats.NON_SELF_ADJOINT_OPERATOR); >> =A0 =A0 =A0} >> =A0} >> >> Copied: >> commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/N= onSquareOperatorException.java >> (from r1178288, >> commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/N= onSquareLinearOperatorException.java) >> URL: >> http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org= /apache/commons/math/linear/NonSquareOperatorException.java?p2=3Dcommons/pr= oper/math/trunk/src/main/java/org/apache/commons/math/linear/NonSquareOpera= torException.java&p1=3Dcommons/proper/math/trunk/src/main/java/org/apache/c= ommons/math/linear/NonSquareLinearOperatorException.java&r1=3D1178288&r2=3D= 1178306&rev=3D1178306&view=3Ddiff >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- >> commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/N= onSquareLinearOperatorException.java >> (original) >> +++ >> commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/N= onSquareOperatorException.java >> Mon Oct =A03 06:33:21 2011 >> @@ -25,9 +25,9 @@ import org.apache.commons.math.exception >> =A0 * @since 3.0 >> =A0 * @version $Id$ >> =A0 */ >> -public class NonSquareLinearOperatorException extends >> DimensionMismatchException { >> +public class NonSquareOperatorException extends >> DimensionMismatchException { >> =A0 =A0 =A0/** Serializable version Id. */ >> - =A0 =A0private static final long serialVersionUID =3D >> -660069396594485772L; >> + =A0 =A0private static final long serialVersionUID =3D >> -4145007524150846242L; >> >> =A0 =A0 =A0/** >> =A0 =A0 =A0 * Construct an exception from the mismatched dimensions. >> @@ -35,7 +35,7 @@ public class NonSquareLinearOperatorExce >> =A0 =A0 =A0 * @param wrong Row dimension. >> =A0 =A0 =A0 * @param expected Column dimension. >> =A0 =A0 =A0 */ >> - =A0 =A0public NonSquareLinearOperatorException(int wrong, int expected= ) >> { >> - =A0 =A0 =A0 =A0super(LocalizedFormats.NON_SQUARE_LINEAR_OPERATOR, wron= g, >> expected); >> + =A0 =A0public NonSquareOperatorException(int wrong, int expected) { >> + =A0 =A0 =A0 =A0super(LocalizedFormats.NON_SQUARE_OPERATOR, wrong, >> expected); >> =A0 =A0 =A0} >> =A0} >> >> Modified: >> commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/P= reconditionedIterativeLinearSolver.java >> URL: >> http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org= /apache/commons/math/linear/PreconditionedIterativeLinearSolver.java?rev=3D= 1178306&r1=3D1178305&r2=3D1178306&view=3Ddiff >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- >> commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/P= reconditionedIterativeLinearSolver.java >> (original) >> +++ >> commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/P= reconditionedIterativeLinearSolver.java >> Mon Oct =A03 06:33:21 2011 >> @@ -66,7 +66,7 @@ public abstract class PreconditionedIter >> =A0 =A0 =A0 * @param x0 Initial guess of the solution. >> =A0 =A0 =A0 * @return A new vector containing the solution. >> =A0 =A0 =A0 * @throws NullArgumentException if one of the parameters is >> =A0 =A0 =A0 {@code null}. >> - =A0 =A0 * @throws NonSquareLinearOperatorException if {@code a} or >> {@code m} is not >> + =A0 =A0 * @throws NonSquareOperatorException if {@code a} or {@code m} >> is not >> =A0 =A0 =A0 * square. >> =A0 =A0 =A0 * @throws DimensionMismatchException if {@code m}, {@code b}= or >> =A0 =A0 =A0 {@code x0} >> =A0 =A0 =A0 * have dimensions inconsistent with {@code a}. >> @@ -77,7 +77,7 @@ public abstract class PreconditionedIter >> =A0 =A0 =A0public RealVector solve(final RealLinearOperator a, >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0final Inverti= bleRealLinearOperator m, >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0final RealVec= tor b, final RealVector x0) >> - =A0 =A0 =A0 =A0throws NullArgumentException, >> NonSquareLinearOperatorException, >> + =A0 =A0 =A0 =A0throws NullArgumentException, NonSquareOperatorExceptio= n, >> =A0 =A0 =A0 =A0 =A0DimensionMismatchException, MaxCountExceededException= { >> =A0 =A0 =A0 =A0 =A0MathUtils.checkNotNull(x0); >> =A0 =A0 =A0 =A0 =A0return solveInPlace(a, m, b, x0.copy()); >> @@ -86,7 +86,7 @@ public abstract class PreconditionedIter >> =A0 =A0 =A0/** {@inheritDoc} */ >> =A0 =A0 =A0@Override >> =A0 =A0 =A0public RealVector solve(final RealLinearOperator a, final >> =A0 =A0 =A0RealVector b) >> - =A0 =A0 =A0 =A0throws NullArgumentException, >> NonSquareLinearOperatorException, >> + =A0 =A0 =A0 =A0throws NullArgumentException, NonSquareOperatorExceptio= n, >> =A0 =A0 =A0 =A0 =A0DimensionMismatchException, MaxCountExceededException= { >> =A0 =A0 =A0 =A0 =A0MathUtils.checkNotNull(a); >> =A0 =A0 =A0 =A0 =A0final RealVector x =3D new >> =A0 =A0 =A0 =A0 =A0ArrayRealVector(a.getColumnDimension()); >> @@ -98,7 +98,7 @@ public abstract class PreconditionedIter >> =A0 =A0 =A0@Override >> =A0 =A0 =A0public RealVector solve(final RealLinearOperator a, final >> =A0 =A0 =A0RealVector b, >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0final RealVec= tor x0) >> - =A0 =A0 =A0 =A0throws NullArgumentException, >> NonSquareLinearOperatorException, >> + =A0 =A0 =A0 =A0throws NullArgumentException, NonSquareOperatorExceptio= n, >> =A0 =A0 =A0 =A0 =A0DimensionMismatchException, MaxCountExceededException= { >> =A0 =A0 =A0 =A0 =A0MathUtils.checkNotNull(x0); >> =A0 =A0 =A0 =A0 =A0return solveInPlace(a, null, b, x0.copy()); >> @@ -116,7 +116,7 @@ public abstract class PreconditionedIter >> =A0 =A0 =A0 * @param b Right-hand side vector. >> =A0 =A0 =A0 * @param x0 Initial guess of the solution. >> =A0 =A0 =A0 * @throws NullArgumentException if one of the parameters is >> =A0 =A0 =A0 {@code null}. >> - =A0 =A0 * @throws NonSquareLinearOperatorException if {@code a} or >> {@code m} is not >> + =A0 =A0 * @throws NonSquareOperatorException if {@code a} or {@code m} >> is not >> =A0 =A0 =A0 * square. >> =A0 =A0 =A0 * @throws DimensionMismatchException if {@code m}, {@code b}= or >> =A0 =A0 =A0 {@code x0} >> =A0 =A0 =A0 * have dimensions inconsistent with {@code a}. >> @@ -125,12 +125,12 @@ public abstract class PreconditionedIter >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0final >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0InvertibleRealLinearOperator >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0m, >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0final RealVector b, >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0final RealVector x0) >> - =A0 =A0 =A0 =A0throws NullArgumentException, >> NonSquareLinearOperatorException, >> + =A0 =A0 =A0 =A0throws NullArgumentException, NonSquareOperatorExceptio= n, >> =A0 =A0 =A0 =A0 =A0DimensionMismatchException { >> =A0 =A0 =A0 =A0 =A0checkParameters(a, b, x0); >> =A0 =A0 =A0 =A0 =A0if (m !=3D null) { >> =A0 =A0 =A0 =A0 =A0 =A0 =A0if (m.getColumnDimension() !=3D m.getRowDimen= sion()) { >> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0throw new >> NonSquareLinearOperatorException(m.getColumnDimension(), >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0throw new >> NonSquareOperatorException(m.getColumnDimension(), >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 m.getRowDimension()); >> =A0 =A0 =A0 =A0 =A0 =A0 =A0} >> =A0 =A0 =A0 =A0 =A0 =A0 =A0if (m.getRowDimension() !=3D a.getRowDimensio= n()) { >> @@ -149,7 +149,7 @@ public abstract class PreconditionedIter >> =A0 =A0 =A0 * @param b Right-hand side vector. >> =A0 =A0 =A0 * @return A new vector containing the solution. >> =A0 =A0 =A0 * @throws NullArgumentException if one of the parameters is >> =A0 =A0 =A0 {@code null}. >> - =A0 =A0 * @throws NonSquareLinearOperatorException if {@code a} or >> {@code m} is not >> + =A0 =A0 * @throws NonSquareOperatorException if {@code a} or {@code m} >> is not >> =A0 =A0 =A0 * square. >> =A0 =A0 =A0 * @throws DimensionMismatchException if {@code m} or {@code = b} >> =A0 =A0 =A0 have >> =A0 =A0 =A0 * dimensions inconsistent with {@code a}. >> @@ -159,7 +159,7 @@ public abstract class PreconditionedIter >> =A0 =A0 =A0 */ >> =A0 =A0 =A0public RealVector solve(RealLinearOperator a, >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0InvertibleRea= lLinearOperator m, >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0RealVector b) >> - =A0 =A0 =A0 =A0throws NullArgumentException, >> NonSquareLinearOperatorException, >> + =A0 =A0 =A0 =A0throws NullArgumentException, NonSquareOperatorExceptio= n, >> =A0 =A0 =A0 =A0 =A0DimensionMismatchException, MaxCountExceededException= { >> =A0 =A0 =A0 =A0 =A0MathUtils.checkNotNull(a); >> =A0 =A0 =A0 =A0 =A0final RealVector x =3D new >> =A0 =A0 =A0 =A0 =A0ArrayRealVector(a.getColumnDimension()); >> @@ -177,7 +177,7 @@ public abstract class PreconditionedIter >> =A0 =A0 =A0 * @return A reference to {@code x0} (shallow copy) updated w= ith >> =A0 =A0 =A0 the >> =A0 =A0 =A0 * solution. >> =A0 =A0 =A0 * @throws NullArgumentException if one of the parameters is >> =A0 =A0 =A0 {@code null}. >> - =A0 =A0 * @throws NonSquareLinearOperatorException if {@code a} or >> {@code m} is not >> + =A0 =A0 * @throws NonSquareOperatorException if {@code a} or {@code m} >> is not >> =A0 =A0 =A0 * square. >> =A0 =A0 =A0 * @throws DimensionMismatchException if {@code m}, {@code b}= or >> =A0 =A0 =A0 {@code x0} >> =A0 =A0 =A0 * have dimensions inconsistent with {@code a}. >> @@ -188,14 +188,14 @@ public abstract class PreconditionedIter >> =A0 =A0 =A0public abstract RealVector solveInPlace(RealLinearOperator a, >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0InvertibleRealLinearOperator >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0m, >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0RealVector b, RealVector >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0x0) >> - =A0 =A0 =A0 =A0throws NullArgumentException, >> NonSquareLinearOperatorException, >> + =A0 =A0 =A0 =A0throws NullArgumentException, NonSquareOperatorExceptio= n, >> =A0 =A0 =A0 =A0 =A0DimensionMismatchException, MaxCountExceededException= ; >> >> =A0 =A0 =A0/** {@inheritDoc} */ >> =A0 =A0 =A0@Override >> =A0 =A0 =A0public RealVector solveInPlace(final RealLinearOperator a, >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = final RealVector b, final >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = RealVector x0) >> - =A0 =A0 =A0 =A0throws NullArgumentException, >> NonSquareLinearOperatorException, >> + =A0 =A0 =A0 =A0throws NullArgumentException, NonSquareOperatorExceptio= n, >> =A0 =A0 =A0 =A0 =A0DimensionMismatchException, MaxCountExceededException= { >> =A0 =A0 =A0 =A0 =A0return solveInPlace(a, null, b, x0); >> =A0 =A0 =A0} >> >> Added: >> commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/S= ingularOperatorException.java >> URL: >> http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org= /apache/commons/math/linear/SingularOperatorException.java?rev=3D1178306&vi= ew=3Dauto >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- >> commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/S= ingularOperatorException.java >> (added) >> +++ >> commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/S= ingularOperatorException.java >> Mon Oct =A03 06:33:21 2011 >> @@ -0,0 +1,39 @@ >> +/* >> + * Licensed to the Apache Software Foundation (ASF) under one or >> more >> + * contributor license agreements. =A0See 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. =A0You may obtain a copy of the License at >> + * >> + * =A0 =A0 =A0http://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; >> + >> +import >> org.apache.commons.math.exception.MathIllegalArgumentException; >> +import org.apache.commons.math.exception.util.LocalizedFormats; >> + >> +/** >> + * Exception to be thrown when trying to invert a singular operator. >> + * >> + * @version $Id$ >> + * @since 3.0 >> + */ >> +public class SingularOperatorException >> + =A0 =A0extends MathIllegalArgumentException { >> + =A0 =A0/** Serializable version Id. */ >> + =A0 =A0private static final long serialVersionUID =3D >> -476049978595245033L; >> + >> + =A0 =A0/** >> + =A0 =A0 * Creates a new instance of this class. >> + =A0 =A0 */ >> + =A0 =A0public SingularOperatorException() { >> + =A0 =A0 =A0 =A0super(LocalizedFormats.SINGULAR_OPERATOR); >> + =A0 =A0} >> +} >> >> Propchange: >> commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/S= ingularOperatorException.java >> ------------------------------------------------------------------------= ------ >> =A0 =A0 svn:eol-style =3D native >> >> Propchange: >> commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/S= ingularOperatorException.java >> ------------------------------------------------------------------------= ------ >> =A0 =A0 svn:keywords =3D Author Date Id Revision >> >> Modified: >> commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/C= onjugateGradientTest.java >> URL: >> http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org= /apache/commons/math/linear/ConjugateGradientTest.java?rev=3D1178306&r1=3D1= 178305&r2=3D1178306&view=3Ddiff >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- >> commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/C= onjugateGradientTest.java >> (original) >> +++ >> commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/C= onjugateGradientTest.java >> Mon Oct =A03 06:33:21 2011 >> @@ -25,7 +25,7 @@ import org.junit.Test; >> >> =A0public class ConjugateGradientTest { >> >> - =A0 =A0@Test(expected =3D NonSquareLinearOperatorException.class) >> + =A0 =A0@Test(expected =3D NonSquareOperatorException.class) >> =A0 =A0 =A0public void testNonSquareOperator() { >> =A0 =A0 =A0 =A0 =A0final Array2DRowRealMatrix a =3D new Array2DRowRealMa= trix(2, >> =A0 =A0 =A0 =A0 =A03); >> =A0 =A0 =A0 =A0 =A0final IterativeLinearSolver solver; >> @@ -55,7 +55,7 @@ public class ConjugateGradientTest { >> =A0 =A0 =A0 =A0 =A0solver.solve(a, b, x); >> =A0 =A0 =A0} >> >> - =A0 =A0@Test(expected =3D >> NonPositiveDefiniteLinearOperatorException.class) >> + =A0 =A0@Test(expected =3D NonPositiveDefiniteOperatorException.class) >> =A0 =A0 =A0public void testNonPositiveDefiniteLinearOperator() { >> =A0 =A0 =A0 =A0 =A0final Array2DRowRealMatrix a =3D new Array2DRowRealMa= trix(2, >> =A0 =A0 =A0 =A0 =A02); >> =A0 =A0 =A0 =A0 =A0a.setEntry(0, 0, -1.); >> @@ -199,7 +199,7 @@ public class ConjugateGradientTest { >> =A0 =A0 =A0 =A0 =A0} >> =A0 =A0 =A0} >> >> - =A0 =A0@Test(expected =3D NonSquareLinearOperatorException.class) >> + =A0 =A0@Test(expected =3D NonSquareOperatorException.class) >> =A0 =A0 =A0public void testNonSquarePreconditioner() { >> =A0 =A0 =A0 =A0 =A0final Array2DRowRealMatrix a =3D new Array2DRowRealMa= trix(2, >> =A0 =A0 =A0 =A0 =A02); >> =A0 =A0 =A0 =A0 =A0final InvertibleRealLinearOperator m; >> @@ -263,7 +263,7 @@ public class ConjugateGradientTest { >> =A0 =A0 =A0 =A0 =A0solver.solve(a, m, b); >> =A0 =A0 =A0} >> >> - =A0 =A0@Test(expected =3D >> NonPositiveDefiniteLinearOperatorException.class) >> + =A0 =A0@Test(expected =3D NonPositiveDefiniteOperatorException.class) >> =A0 =A0 =A0public void testNonPositiveDefinitePreconditioner() { >> =A0 =A0 =A0 =A0 =A0final Array2DRowRealMatrix a =3D new Array2DRowRealMa= trix(2, >> =A0 =A0 =A0 =A0 =A02); >> =A0 =A0 =A0 =A0 =A0a.setEntry(0, 0, 1d); >> >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org > For additional commands, e-mail: dev-help@commons.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org