commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilles <gil...@harfang.homelinux.org>
Subject Re: svn commit: r1536073 - in /commons/proper/math/trunk/src: changes/changes.xml main/java/org/apache/commons/math3/analysis/differentiation/SparseGradient.java test/java/org/apache/commons/math3/analysis/differentiation/SparseGradientTest.java
Date Sun, 27 Oct 2013 13:34:34 GMT
On Sun, 27 Oct 2013 09:52:44 -0000, luc@apache.org wrote:
> Author: luc
> Date: Sun Oct 27 09:52:44 2013
> New Revision: 1536073
>
> URL: http://svn.apache.org/r1536073
> Log:
> Added SparseGradient to deal efficiently with numerous variables.
>
> [...]
> +
> +    /**
> +     * Multiply in place.
> +     * <p>
> +     * This method is designed to be faster when used multiple times
> in a loop.
> +     * </p>
> +     * <p>
> +     * The instance is changed here, in order to not change the
> +     * instance the {@link #add(SparseGradient)} method should
> +     * be used.
> +     * </p>
> +     * @param a instance to multiply
> +     */
> +    public void multInPlace(final SparseGradient a) {
                    ^^^^^^^^^^^

Shouldn't the name composed of full words (i.e be "multiplyInPlace")?

> [...]
> +
> +    /**
> +     * Get a hashCode for the derivative structure.
> +     * @return a hash code value for this object
> +     * @since 3.2
> +     */
> +    @Override
> +    public int hashCode() {
> +        return 743 + 809 *  + 233 * MathUtils.hash(value) + 167 *
                           ^^^^^^
Typo?

> derivatives.hashCode();
> +    }
> +
> +}
>

Regards,
Gilles


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message