[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## Re: Matrices and "type tags"

**From**: |
John W. Eaton |

**Subject**: |
Re: Matrices and "type tags" |

**Date**: |
Thu, 9 Dec 1999 16:25:33 -0600 (CST) |

On 9-Dec-1999, Jon Wilkening <address@hidden> wrote:
| There are all sorts of matrices it would be nice to be able to
| recognize: triangular, tridiagonal, SPD, orthogonal, nearly singular...
| In matlab I think they try solve A\b by back-substitution if A
| is triangular, by cholesky if it is SPD, and otherwise by Gaussian
| elimination with partial pivoting -- but you never really know
| what it decided to do. Perhaps instead of type-tags and the
| all-purpose backslash there should be a family of less elegant
| commands that give more control over how the system is solved.
| (Maybe there are such commands already?)
Octave currently represents matrices internally by using different
classes. Complex and real are all that are really used now, but there
are diagonal matrix classes in liboctave, and I think we will soon
have a sparse matrix class too. I'm considering adding banded matrix
classes, and perhaps triangular (trapezoidal?) myself. Once those are
in place, I think the correct thing for Octave's value object to do is
to to convert to specific types when appropriate (similar to the
complex to real conversion that currently occurs if all imaginary
parts of a complex matrix become zero). Then the appropriate
operation for a matrix could be performed depending on its class.
jwe
-----------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.che.wisc.edu/octave/octave.html
How to fund new projects: http://www.che.wisc.edu/octave/funding.html
Subscription information: http://www.che.wisc.edu/octave/archive.html
-----------------------------------------------------------------------