>>>>> "JonR" == Jonathan Rougier <J.C.Rougier@durham.ac.uk> writes:JonR> ... By the way, I have `solve' JonR> methods for triangular matrices and variance matrices -- would JonR> you be interested? { Jonathan, I hope it's okay if I CC this to R-devel; this must be of a wider interest } Ye.e..s; for triangular ones, there's the 4 different ways of backsolve()/forwardsolve().. Well, we (R core) have discussed matrix classes months and years ago.. and haven't really started doing anything about it. I think we then agreed to follow Splus' Matrix library and use class "Matrix" (and classes inheriting from "Matrix", i.e. class == c("specialMatrix", "Matrix") ). If we really go into this, then we'd probably want to use the SAME class names that S-plus' library(Matrix) is using. Also, I remember that people (on the old R-testers list?) very much desired to have 1-column or 1-row matrices instead of vectors when working within the "Matrix" class [= behavior of Octave/Matlab ?] Other opinions / (code) contributions ? Martin Maechler <maechler@stat.math.ethz.ch> http://stat.ethz.ch/~maechler/ Seminar fuer Statistik, ETH-Zentrum SOL G1; Sonneggstr.33 ETH (Federal Inst. Technology) 8092 Zurich SWITZERLAND phone: x-41-1-632-3408 fax: ...-1086 <>< -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. ---559023410-1902445306-917000089=:29339 Content-Type: TEXT/PLAIN; charset=US-ASCII Hi Martin, I attach my versions of solve methods for triangular and variance matrices. The triangular method is a wrapper for backsolve() which allows both a trans flag and a right flag (ie giving the four different solves that you alluded to). The variance method uses a cholesky decomposition and then two triangular solves (one with the trans flag set), as recommended by Golub and van Loan. I have taken care with the returning vector/matrix, as in the backsolve() patch! I was not in on the previous Matrix class discussion. I use them in Splus, but from a purely aesthetic point of view I don't like the idea that R would need a Matrix add-on. I think I would rather see the appropriate methods built into the base. Cheers, Jonathan. Jonathan Rougier Science Laboratories Department of Mathematical Sciences South Road University of Durham Durham DH1 3LE "[B]egin upon the precept ... that the things we see are to be weighed in the scale with what we know" (Meredith, 1879, The Egoist) ---559023410-1902445306-917000089=:29339 Content-Type: APPLICATION/octet-stream; name="solve.tar.gz" Content-Transfer-Encoding: BASE64 Content-ID: <Pine.GSO.3.96.990122101449.29339R@laplace> Content-Description: H4sICMlMqDYAA3NvbHZlLnRhcgDtWHtv2zYQz7/hp7gkaCcNiiH5kT62rFg2 dNjQrUMbGwGaDqMl2uaiV0XKrqHqu+9ISrJk97ECaYYCPgQxJB7vxbvj/SSS cMl6MuM0nuchzXovDm6dXM91z4bDA9d1+96or3+Hff2sadQfHbhnZ6O+Ozzz vDN87w3x8cC9fVN2KReSZqgyiKj7j599kA/XPyrH1V4NjFPe4LbN/FIkts4f vj+FWR77kiexNXbgwgGZ0VicP3Ug4/OFPH9qk4IcxooxzpKVNbbJIZ+BFXEh eDy3Lmx8cXih1gNO51aMjywUDPQrKnoRRXVvkc/sO7K0Anj3zijQ26fUv9Gm aRtqCYrdMN+/D0eGu8Ms0ZpX8WPPAfz3GneaBweCLEnPn762t55bco8awY1c aTUmSDS3jsSlXdsjrY6dignXSvJ/H+pn0Pb5914Et67jE/U/8NxW/fcfqPof uQN3X/93QNcxjVixnQUlIdeSy5AVL9UKsDc5VR1BwIrLBbTahSlmxZ8LOt+V 9KEeonbQkFPxXt00m+cRi6UoCFxzyaJiXBbjNGXZru5eWfNclMXzVJlJQ1gy XyYZJLtc2pSyeLlI8jCAaz8JGEqHKTNGpolgwZOGW9tbFj8nTGx4kUeeRnko eRqukVeZHDDhZ1yrL8jlgkHAZhRZwKeqwwiQCWhXazFwfe/b63twBedwUcIM LTULV2VP75erBGYhnQugoUjwX5isQOICSsmVGkhm1RbV9jriiFUtmIZVYu+q hFdsY6O1YjOHotloHJAuq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XtXhuxoxuLJNiINsN8C8H82Ao5bQ4sYCmLFdqBPG3ie2H2 ZWyGocSDFMXf1Z1ivDOp+I0DvyAOnmoXlohKniUUo+U9ejhwIE178PDs9JF3 y/il5fIWglGx3gYvIcfhOFtb0ZLa5KqFZDK8QWfW0HXtCs9gf7RJEHS/jwZc SOsKrz99ebK3qXUaBH/1bdK5Put0PyZk4rVuqvp7wEQN/ypwCqzg4Ynqw4I6 B9/PM+qvyaTfbKxhZVvAiY6x/gghecRqcIG17D1Wlmt8Ud+rtEY4DdPGI8Nu d7ire7jcY4s97WlPe7pb+hd2QJcuAB4AAA=---559023410-1902445306-917000089=:29339-- -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._