[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## Definition of operators in the parser

**From**: |
Jordi Gutiérrez Hermoso |

**Subject**: |
Definition of operators in the parser |

**Date**: |
Thu, 1 Jul 2010 11:44:03 -0500 |

In the text quoted below, I am rather satisfied with myself for being
able to trace through the code except for one bit. At what point in
the code does the parser translate "A\b" into xdiv and relatives?
Thanks.
2010/7/1 Jordi Gutiérrez Hermoso <address@hidden>:
>* O010/7/1 Jaana Tommiska <address@hidden>:*
>*> If Ax=b is underdetermined, does A\b calculate minimum 2-norm solution ?*
>
>* Yes. Look here for where the division operators are defined:*
>
>* http://hg.savannah.gnu.org/hgweb/octave/file/14af8004945d/src/xdiv.cc#l343*
>
>* The solve functions that do all the work are declared here:*
>
>* *
>* http://hg.savannah.gnu.org/hgweb/octave/file/14af8004945d/liboctave/dMatrix.h#l179*
>
>* If you go look at the definition of solve, you see that it first*
>* checks for some basic matrix types, and if it's singular or*
>* rectangular, it calls lssolve (least squares solve):*
>
>* *
>* http://hg.savannah.gnu.org/hgweb/octave/file/14af8004945d/liboctave/dMatrix.cc#l1928*
>
>* The definition of which is here, further down that file:*
>
>* *
>* http://hg.savannah.gnu.org/hgweb/octave/file/14af8004945d/liboctave/dMatrix.cc#l2227*
>
>* where you can see that it finally calls the Fortran functions DGELSD*
>* (lines 2272 and 2279).*
>
>* Finally, if you consult a BLAS/LAPACK reference, because Octave no*
>* longer ships versions of those libraries with itself, you'll find:*
>
>* http://www.netlib.org/lapack/double/dgelsd.f*
>
>* So that's your answer. That's the function that it eventually calls in*
>* the situation you describe, and you can look at the code above to see*
>* exactly how and with what parameters it calls it.*
>

**Definition of operators in the parser**,
*Jordi Gutiérrez Hermoso* **<=**