commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Neidhart (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MATH-980) Let the VectorXD classes in the geometry package implement Clusterable
Date Fri, 24 May 2013 19:10:21 GMT

    [ https://issues.apache.org/jira/browse/MATH-980?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13666570#comment-13666570
] 

Thomas Neidhart commented on MATH-980:
--------------------------------------

See the clustering example that I added recently. Vector2D is quite convenient to create sample
data, and then if you want to cluster it for example, you would have to clone it to a DoublePoint
atm, which could be avoided if the Vector classes would implement the Clusterable interface
(btw. you objected the DoublePoint class initially if I remember correctly).

Too much coupling between packages is surely not a good thing, but in this case I see benefits
of doing so and would also allow the re-use of existing classes within CM.
                
> Let the VectorXD classes in the geometry package implement Clusterable
> ----------------------------------------------------------------------
>
>                 Key: MATH-980
>                 URL: https://issues.apache.org/jira/browse/MATH-980
>             Project: Commons Math
>          Issue Type: Improvement
>            Reporter: Thomas Neidhart
>            Priority: Minor
>
> It would be quite convenient if the Vector1D, Vector2D and Vector3D classes could be
used directly by the clustering algorithms. The updated Clusterable interface now only requires
one method:
>  * double[] getPoint()
> which is already supported by these classes: toArray()
> We could let them implement the Clusterable interface by simply delegating the call to
getPoint() to toArray().

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message