On Thu, Aug 5, 2010 at 2:38 PM, Sebastian Schelter
<[email protected]>wrote:

> Hi Jake,
>
> the patch attached at MAHOUT-456 should fix that.
>
> The problem is that RowSimilarityJob (which is used internally by the
> RecommenderJob) produces SequentialAccessSparseVectors with cardinality
> Integer.MAX_VALUE. When assign(Vector) is invoked on those later, the
> inner loop in AbstractVector.assign() runs from 0 to Integer.MAX_VALUE...
>
> I made RowSimilarityJob produce RandomAccessSparseVectors to prevent this.
>

Would it not be better to fix that inner loop of AbstractVector.assign(), to
zero out
the current values, followed by using iterateNonZero() on the argument?

  -jake

Reply via email to