commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arne Plöse (JIRA) <j...@apache.org>
Subject [jira] [Created] (MATH-570) Change some constructors of ArrayFieldVector to accept FieldVector
Date Mon, 09 May 2011 12:18:03 GMT
Change some constructors of ArrayFieldVector to accept FieldVector
------------------------------------------------------------------

                 Key: MATH-570
                 URL: https://issues.apache.org/jira/browse/MATH-570
             Project: Commons Math
          Issue Type: Improvement
    Affects Versions: 2.2.1, 3.0
            Reporter: Arne Plöse


the constructor     public ArrayFieldVector(T[] v1, ArrayFieldVector<T> v2) {
 ... 
}
takes an ArrayFieldVector.

but the same can be easier archieved with this 

    public ArrayFieldVector(T[] v1, FieldVector<T> v2) {
        this(v1, v2 == null ? null : v2.getData());
    }
this goes for all other constructors...

P.S. I donk know if copying the data in getData is an issue ... for this the named constructor
may make sense...

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

Mime
View raw message