_On Fri, 2010-01-08 at 00:03 -0700, Jason Grout wrote:
> Dag Sverre Seljebotn wrote:
> > Hi Jason Grout (and others),
> > 
> > we started something on IRC last night which I really wanted to finish, 
> > since you mentioned that you might pick up work again on dense RDF/CDF 
> > matrices at some point.
> 
> 
> It's likely that that point won't be very soon (i.e., before summer), 
> but I did plan on fixing the solve_left bug at the Sage Days in a week.
> 
> I am pretty interested in a general framework for organizing the matrix 
> code so that matrices are intuitive and powerful.  It seems that we have 
> two orthogonal criteria for structuring the matrix classes:
> 
>   (1) By matrix structure
> 
>   (2) By matrix element datatype
> 
> Right now, the classes are arranged first by sparse/dense, then by 
> matrix element datatype.  However, in a lot of cases, it is very 
> valuable to know and store a representation of the matrix that takes 
> advantage of the structure.  How do we deal with both pieces of 
> information (structure and element datatype) without the explosion of 
> all possible combinations in the actual code?

My final opinion for now is to at least change the top like this:

- matrix
  [- non-numeric - optional]
     - sparse
     - dense
  - numeric
     - dense numeric
     - sparse numeric

(There's nothing of value for numerics in Matrix_sparse or Matrix_dense,
the numerical matrices might as well inherit directly from Matrix.)

This is mainly because of docstrings -- I think it makes sense to have
"context sensitive docs". If you have an RDF matrix you don't want an
example in left_solve on Qp(5), and if you have a matrix on Qp(5) you
probably care less about iterative refinement and decomposition
selection.

Mostly anything else than docstrings can always be refactored out to
contained objects to decouple the inheritance hierarchies if really
needed, so it makes sense to have the UI/docstrings drive the
inheritance hierarchy.

Dag Sverre

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to