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