The issue is when adding a sparse vector to a dense vector (with the dense vector being mutated) that the dense vector doesn't know how to use the sparse iterator.
Following up on Jake's comment, could we have a marker interface that indicates a function maps 0 to 0? The abstract vector and matrix implementations could use instanceOf to decide what to do. On Sun, Dec 13, 2009 at 5:12 AM, Sean Owen <[email protected]> wrote: > In my particular case, I just need "Scale" instead of "PlusWithScale", > and that can take advantage of sparseness. > > My (er, Ted's) current approach is to sum SparseVectors. This takes > advantage of sparseness already. > > Am I missing why a Scale/PlusWithScale implementation, when using > sparseness, would be notably faster? > >
