[ https://issues.apache.org/jira/browse/MAHOUT-268?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jake Mannix reassigned MAHOUT-268: ---------------------------------- Assignee: Jake Mannix > Vector.getDistanceSquared() is incorrect for both SparseVector varieties > ------------------------------------------------------------------------ > > Key: MAHOUT-268 > URL: https://issues.apache.org/jira/browse/MAHOUT-268 > Project: Mahout > Issue Type: Bug > Affects Versions: 0.2 > Environment: all > Reporter: Jake Mannix > Assignee: Jake Mannix > Fix For: 0.3 > > > I'm pretty sure that getDistanceSquared() should just return as if an > optimized implementation of: > {code} > public double getDistanceSquared(Vector v) { return > this.minus(v).getLengthSquared(); } > {code} > In which case if some vector elements are negative, both > SequentialAccessSparseVector (my fault!) and RandomAccessSparseVector return > the wrong thing. Very easy to write a failing unit test for this one. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.