We update using a functional style.  As Sebastian pointed out, the key
entry point is assign(...) in various flavors.  Common mutations like
addition of sparse vectors are special cased.




On Mon, Apr 15, 2013 at 3:01 AM, Andy Twigg <[email protected]> wrote:

> Hello all,
>
> As far as I can tell, mahout.math vectors are generally immutable, i.e.
>
> Vector x = foo
> Vector y = bar
> x=x.plus(y) // creates a new vector
> x=x.normalize() // creates a new vector
>
> This seems very inefficient. Is there an alternative, mutable strategy?
>
> -Andy
>
>
> --
> Dr Andy Twigg
> Junior Research Fellow, St Johns College, Oxford
> Room 351, Department of Computer Science
> http://www.cs.ox.ac.uk/people/andy.twigg/
> [email protected] | +447799647538
>

Reply via email to