On Jul 1, 2010, at 7:08 AM, Sean Owen wrote: > Any algorithm can use it. It's not going to magically work without > code changes perhaps. This code wants to directly instantiate Vector > implementations, so it does not work to pass it NamedVector, which is > not an implementation itself. If a caller wants the output to have > names, it can wrap the output in NamedVector. I assume this is the > right thing, since Jeff says that Dirichlet by nature does not use > names. Is that the right approach, and if so, what's the issue with > it? I think we all agree non-named vectors exist and should be modeled > separately, so NamedVector itself is the right thing.
The issue is that all I did was fix how LuceneIterable works (to use NamedVector) and now Dirichlet is broken. My point is it shouldn't matter what the implementation of Vector is, it should just work, especially in the case of NamedVector which is just a lightweight wrapper. I'd argue that the problem is in Dirichlet in that it constructs its vectors incorrectly by assuming a particular kind of vector. Furthermore, it needs to be able to preserve that name across all operations. Without the ability to use a NamedVector in many cases, one has no way of doing anything useful with the output. > > On Thu, Jul 1, 2010 at 11:51 AM, Grant Ingersoll <gsing...@apache.org> wrote: >> I guess my point is that if we are going to have a NamedVector, then any of >> the algs. should be able to use it, otherwise what's the point of having it? >> We likely need a better way of constructing things. >>