Ok. The use case is read-only random Vector & Matrix classes. They return the same value for each position. They take no space. Matrix.like() could make whatever you want: Dense, Sparse, whatever.
https://issues.apache.org/jira/browse/MAHOUT-550 Please have a look and tell me if this is on the right track. On Fri, Nov 19, 2010 at 8:44 AM, Jeff Eastman <[email protected]> wrote: > +1 Seems sensible to me too > > -----Original Message----- > From: Ted Dunning [mailto:[email protected]] > Sent: Friday, November 19, 2010 8:12 AM > To: [email protected] > Subject: Re: Matrix and Vector classes: Read-only semantics > > What it really means is fail or return something sensible. I think your > interpretation > is pretty sensible. > > On Fri, Nov 19, 2010 at 1:28 AM, Lance Norskog <[email protected]> wrote: > >> 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 [email protected]
