<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><blockquote type="cite" class=""><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class="">Something Haskell has lacked for a long time is a good medium-duty
linear system solver based on the LU decomposition. There are bindings
to the usual C/Fortran libraries, but not one in pure Haskell. (An
example "LU factorization" routine that does not do partial pivoting has
been around for years, but lacking pivoting it can fail unexpectedly on
well-conditioned inputs. Another Haskell LU decomposition using partial
pivoting is around, but it uses an inefficient representation of the
pivot matrix, so it's not suited to solving systems of more than 100 x
100, say.)
By medium duty I mean a linear system solver that can handle systems of
(1000s) x (1000s) and uses Crout's efficient in-place algorithm. In
short, a program does everything short of exploiting SIMD vector
instructions for solving small subproblems.
Instead of complaining about this, I have written a little library that
implements this. It contains an LU factorization function and an LU
system solver. The LU factorization also returns the parity of the
pivots ( = (-1)^(number of row swaps) ) so it can be used to calculate
determinants. I used Gustavson's recursive (imperative) version of
Crout's method. The implementation is quite simple and deserves to be
better known by people using functional languages to do numeric work.
The library can be downloaded from GitHub:
<a href="https://github.com/gwright83/luSolve" class="">https://github.com/gwright83/luSolve</a></pre></blockquote><div class=""><br class=""></div><div class="">Great news :)</div><div class=""><br class=""></div><div class="">
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">Dominic Steinitz</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><a href="mailto:dominic@steinitz.org" class="">dominic@steinitz.org</a></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><a href="http://idontgetoutmuch.wordpress.com" class="">http://idontgetoutmuch.wordpress.com</a></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">Twitter: @idontgetoutmuch</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><br class="Apple-interchange-newline">
</div>
<br class=""></body></html>