I'm writing classes for read-only, 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 real-world testing.
These are the first read-only 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 read-only class cannot
do this. I think the semantics meant are: "return a writable Vector
with the same dense/sparse styleas this Vector": a dense read-only
vector class would create a DenseVector, for example.
Yes? No?
--
Lance Norskog
goksron@gmail.com
|