commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sébastien Brisard <sebastien.bris...@m4x.org>
Subject Re: svn commit: r1163515 - in /commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear: AbstractRealMatrix.java RealLinearOperator.java
Date Wed, 31 Aug 2011 11:56:04 GMT
I'm sorry Gilles. That's corrected in revision 1163587. Thanks! Sébastien

2011/8/31 Gilles Sadowski <gilles@harfang.homelinux.org>:
> On Wed, Aug 31, 2011 at 07:41:26AM -0000, celestin@apache.org wrote:
>> Author: celestin
>> Date: Wed Aug 31 07:41:25 2011
>> New Revision: 1163515
>>
>> URL: http://svn.apache.org/viewvc?rev=1163515&view=rev
>> Log:
>> Removed occurences of double[] from RealLinearOperator (see MATH-653)
>> method double[] operate(double[]) has been left in AbstractRealMatrix, according
to exchanges on this JIRA ticket.
>>
>> Modified:
>>     commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/AbstractRealMatrix.java
>>     commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/RealLinearOperator.java
>>
>> Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/AbstractRealMatrix.java
>> URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/AbstractRealMatrix.java?rev=1163515&r1=1163514&r2=1163515&view=diff
>> ==============================================================================
>> --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/AbstractRealMatrix.java
(original)
>> +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/AbstractRealMatrix.java
Wed Aug 31 07:41:25 2011
>> @@ -625,7 +625,6 @@ public abstract class AbstractRealMatrix
>>      }
>>
>>      /** {@inheritDoc} */
>> -    @Override
>>      public double[] operate(final double[] v) {
>>          final int nRows = getRowDimension();
>>          final int nCols = getColumnDimension();
>>
>> Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/RealLinearOperator.java
>> URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/RealLinearOperator.java?rev=1163515&r1=1163514&r2=1163515&view=diff
>> ==============================================================================
>> --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/RealLinearOperator.java
(original)
>> +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/RealLinearOperator.java
Wed Aug 31 07:41:25 2011
>> @@ -17,8 +17,6 @@
>>
>>  package org.apache.commons.math.linear;
>>
>> -import org.apache.commons.math.exception.DimensionMismatchException;
>> -
>>  /**
>>   * This class defines a linear operator operating on real ({@code double})
>>   * vector spaces.
>> @@ -70,24 +68,8 @@ public abstract class RealLinearOperator
>>       *
>>       * @param x Vector to operate on.
>>       * @return the product of {@code this} instance with {@code x}.
>> -     */
>> -    public double[] operate(final double[] x) {
>> -        if (x.length != getColumnDimension()) {
>> -            throw new DimensionMismatchException(x.length, getColumnDimension());
>> -        }
>> -        final RealVector y = operate(new ArrayRealVector(x, false));
>> -        if (y instanceof ArrayRealVector) {
>> -            return ((ArrayRealVector) y).getDataRef();
>> -        } else {
>> -            return y.getData();
>> -        }
>> -    }
>> -
>> -    /**
>> -     * Returns the result of multiplying {@code this} by the vector {@code x}.
>> -     *
>> -     * @param x Vector to operate on.
>> -     * @return the product of {@code this} instance with {@code x}.
>> +     * @throws org.apache.commons.math.exception.DimensionMismatchException
>> +     *         if {@code getColumnDimension() != v.getDimension()}
>>       */
>>      public abstract RealVector operate(final RealVector x);
>>  }
>>
>>
>
> Javadoc: What is "v"? ;-)
> I also tend to prefer a real sentence rather than a copy/paste of code
> excerpts; e.g.
>  [...] if the column dimension does not match the size of vector {@code x}.
>
>
> Best,
> Gilles
>
> ---------------------------------------------------------------------
> 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


Mime
View raw message