On Nov 19, 2010, at 4:28 AM, Lance Norskog wrote:
> I'm writing classes for readonly, repeatable random vector and and
> matrix. V[i] always returns the same number. M[i,j] always returns the
> same random number. I'm making a patch and will contribute when it
> gets some realworld testing.
>
> These are the first readonly Vector and Matrix classes. There were a
> few hiccups. The only real problem I encountered was Vector.like() and
> Matrix.like().
>
> The javadoc is:
> Return an empty vector/matrix of the same underlying class
> as the receiver.
>
> Here's the problem: "empty" means writable. A readonly class cannot
> do this. I think the semantics meant are: "return a writable Vector
> with the same dense/sparse styleas this Vector": a dense readonly
> vector class would create a DenseVector, for example.
>
> Yes? No?
I believe so, but it also is the same size as the original, too, and has the same other properties
w/ the exception of the actual data.
