[
https://issues.apache.org/jira/browse/MAHOUT-1580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14031643#comment-14031643
]
ASF GitHub Bot commented on MAHOUT-1580:
----------------------------------------
Github user sscdotopen commented on the pull request:
https://github.com/apache/mahout/pull/17#issuecomment-46095388
It is a misconception that this method gives approximate answers. It did
not do this before my changes and it doesn't do it with the changes. I just
made it faster.
> Optimize getNumNonZeroElements
> ------------------------------
>
> Key: MAHOUT-1580
> URL: https://issues.apache.org/jira/browse/MAHOUT-1580
> Project: Mahout
> Issue Type: Improvement
> Components: Math
> Reporter: Sebastian Schelter
> Assignee: Sebastian Schelter
> Fix For: 1.0
>
>
> getNumNonZeroElements in AbstractVector uses the nonZeroes -iterator
> internally which adds a lot of overhead for certain types of vectors, e.g.
> the dense ones. We should add custom implementations here.
--
This message was sent by Atlassian JIRA
(v6.2#6252)