On Sun, Apr 18, 2010 at 11:16 PM, Jake Mannix <jake.man...@gmail.com> wrote:
> VectorWritable currently is a proper decorator, right?  It doesn't even
> implement Vector at all.

Yeah, the other *Writable classes should be as well. NamedVector
should both be a Vector and decorate a Vector too. Its Writable also
decorates a NamedVector.

>
> What exactly are you suggesting the hierarchy to be?
>
>  1) Vector is an interface, NamedVector extends it

(I just have NamedVector as a concrete subclass, a decorator)

>  2) DenseVectorWritable implements Writable, does not implement Vector
>  3) ditto for *AccessSparseVector

Yes

>  4) VectorWritable acts still just as it is now, basically

Yes, made it more general so we don't have to modify it to handle each
new Vector impl too.

>
> In looking over the code, I noticed that both of the SparseVectors are
> inefficient in their read()'ing, in that they are basically building up the
> vectors from scratch, which is silly, esp. in the case of the
> SequentialAccessSparseVector, which should be just reading in
> the int[] and double[] and constructing the OrderedIntDoubleMapping
> straight from that.  Waaaay faster.

Agree, this is one of many things we could tweak.

Reply via email to