This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Matrix smobs in guile


> Question: is there a standard smob for matrices?

Not a standard one. There is the G-Wrapped LINPACK and there
is my sparse matrix implementation at

http://www.progsoc.uts.edu.au/~telford/samples/guile/

Mine has less features, currently it supports:
* Sparse storage format (approx 16 bytes per non-zero matrix element)
* Store a specified element
* Add to a specified element
* Recall a specified element
* Multiplication of matricies
* Addition of matricies
* A rather poor Gaussian solver for linear equations
* A quite good ICCG solver for symmetric linear equations
* can write a matrix to a port in [[1 2 3][4 5 6][7 8 9]] format
* can read the same format from a port
* Some finite element stuff

I have rudimentary support for complex number matricies and
complex linear solvers but most of it doesn't work.

Linpack is more complete but larger and more cumbersome.
My stuff is (I feel) a little more streamlined (and buggy).

> Supplementary issues:  When transferring data to and from octave, what
> structure is passed?  What about plotting with gnuplot as one can in
> Octave?

Dunno about octave. Gnuplot will handle files that are just columns
of numbers. For 3d plotting the samples must be on a regular grid and
the file has blank lines to group the rows. It is a very easy format
to generate in any language so the value of writing special-purpose
export routines seems small.

	- Tel

> /* Types of supported uniform array */
> typedef enum {
>   GMAT_SIGNED, GMAT_UNSIGNED, GMAT_FLOAT, GMAT_DOUBLE, GMAT_LASTTYPE
> } gmat_types;

I only support doubles, figure there is no point in messing around.

	- Tel