You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gilles (JIRA)" <ji...@apache.org> on 2011/07/23 00:53:09 UTC

[jira] [Resolved] (MATH-629) Multiple dispatch of overloaded methods in "ArrayRealVector"

     [ https://issues.apache.org/jira/browse/MATH-629?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gilles resolved MATH-629.
-------------------------

    Resolution: Fixed

Revision 1149756.

> Multiple dispatch of overloaded methods in "ArrayRealVector"
> ------------------------------------------------------------
>
>                 Key: MATH-629
>                 URL: https://issues.apache.org/jira/browse/MATH-629
>             Project: Commons Math
>          Issue Type: Improvement
>            Reporter: Gilles
>            Assignee: Gilles
>            Priority: Trivial
>             Fix For: 3.0
>
>
> E.g. the "add(RealVector)" method is
> {code}
> public RealVector add(RealVector v) {
>     if (v instanceof ArrayRealVector) {
>         return add((ArrayRealVector) v);
>     } else { // ...
> {code}
> To avoid one unnecessary method call, it should become
> {code}
> public RealVector add(RealVector v) {
>     if (v instanceof ArrayRealVector) {
>         return add(((ArrayRealVector) v).data);
>     } else { // ...
> {code}
> And similarly for other methods.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira