octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: nd-arrays


From: John W. Eaton
Subject: Re: nd-arrays
Date: Fri, 19 Sep 2003 16:48:42 -0500

On 17-Sep-2003, I wrote:

| I started working on these changes last Friday and now I have something
| that is mostly working.  Instead of
| 
|              Array <--- Marray <--- RowVector, etc.
|                ^
|                |
|         +--------+
|         |        |
|         |        |
|       ArrayN   Array2 <--- Marray2 <--- Matrix, etc.
|         ^        ^
|         |        |
|      MArrayN   Array3
|         ^
|         |
|      NDArray, etc.
| 
| 
| (arrows point toward the base class) we now have
| 
| 
|      Array <--- MArray <--- RowVector, etc.
|        ^
|        |
|        +------- Array2 <--- MArray2 <--- Matrix, etc.
|        |
|        +------- Array3
|        |
|        +------- ArrayN <--- MArrayN <--- NDArray, etc.
| 
| 
| so the Array class itself is multidimensional and the Array2 and
| Array3 classes are just special cases of that.  The ArrayN class
| probably isn't actually needed, but I've left it there for now.
| 
| The interfaces of the RowVector, Matrix, etc. classes have not
| changed.  The interface for Array has changed, but I think the changes
| are backward compatible.
| 
| I've modified the octave_matrix object so that is based on the NDArray
| object instead of the Matrix object.  I'll do the same for the
| octave_complex_matrix object, then also cell and structure arrays so
| they will become N-dimensional.

I've checked in my changes.  The public CVS archive should be updated
soon.

Octave still passes all of its tests (except the 4 that were already
known to fail and that have nothing to do with N-d objects), but I
could have introduced some problems that are not showing up in the
tests.  All 2-d indexing and indexed assignment operations should
still be handled by the same code as before, so I think those things
should work just as well as they did before my changes.

At this point, we have N-d real, complex, bool, and character arrays,
as well as N-d cell and structure arrays.  For N-d (N > 2) objects,
indexing doesn't work and indexed assignment only works for a few
simple cases.  Printing of the N-d data types doesn't work correctly.
But the underlying data structures are there now, and I think the new
inheritance hierarchy is better than before.  There is lot of work to
do, but now it should be much more straightforward to see what needs
to be done.  Perhaps we can divide up the work and clean things up so
that N-d objects are really functional in a relatively short time.

Thanks,

jwe




reply via email to

[Prev in Thread] Current Thread [Next in Thread]