Home | About | Sematext search-lucene.com search-hadoop.com
 Search Lucene and all its subprojects:

Switch to Threaded View
Mahout, mail # dev - removal of addTo() in vectors


Copy link to this message
-
Re: removal of addTo() in vectors
Jake Mannix 2011-09-06, 16:21
Ah yes, forgot about which case we were doing.  Simple solution: bring back
addTo().  Why did we get rid of it?

On Tue, Sep 6, 2011 at 9:10 AM, Sebastian Schelter <[EMAIL PROTECTED]> wrote:

> Would need to iterate on non-zeros of the argument even, not on the
> receiver.
>
> On 06.09.2011 17:24, Ted Dunning wrote:
> > Shouldn't AbstractVector specially detect the plus case and iterate only
> on
> > non-zeros?
> >
> > On Tue, Sep 6, 2011 at 9:59 AM, Jake Mannix <[EMAIL PROTECTED]>
> wrote:
> >
> >> Why not just override assign() in the sparse subclasses?
> >>
> >> On Sep 6, 2011 5:28 AM, "Sebastian Schelter" <[EMAIL PROTECTED]> wrote:
> >>
> >> The replacement of addTo() with .assign(..., Functions.PLUS) might cause
> >> havoc in sparse vectors with dimension Integer.MAX_VALUE as
> >> AbstractVector assign() will run from 0 to Integer.MAX_VALUE.
> >>
> >> Should we reintroduce it then?
> >>
> >> --sebastian
> >>
> >
>
>