On Wed, Jul 13, 2011 at 03:01:09PM -0700, Ted Dunning wrote:
> Actually, this is a major issue.

Indeed, it is an important design issue.

> Take, for instance, the example of considering a Lucene index as a linear
> operator.  The number of rows is the number of documents (which is changing
> as documents are added) and the number of columns is the number of unique
> terms (which is also changing as documents are added).
> 
> Matrix multiplication consists of translating a (hopefully sparse) vector
> into a query, running the query and interpreting the result as a (sparse)
> vector.
> 
> This is just one of a host of similar application oriented definitions of a
> LinearOperator, none of which define the number of rows and columns at
> construction time.
> 
> I can still do a singular value decomposition of this linear operator

Eventually it seems to come down to a programming style issue. What you
expose above (the decomposition algorithm) uses _fixed_ dimensions; when you
need another object (with different dimensions) you'll create a new one.

Both approaches are possible for your use case. But what I think should be
avoided is several programming styles within a single library.
The abstract accessor style is uncommon in CM and in the "linear" package,
the implementations use this style for no good reason (as I've indicated in
my previous mail).


Regards,
Gilles

> On Wed, Jul 13, 2011 at 1:52 PM, Phil Steitz <phil.ste...@gmail.com> wrote:
> 
> > This is not a huge issue, though, so I can live with it if you feel
> > strongly that the fields should be persisted at the top level.
> >

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to