mahout-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lance Norskog <>
Subject Matrix and Vector classes: Read-only semantics
Date Fri, 19 Nov 2010 09:28:45 GMT
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 and

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

View raw message