- fewer dependencies (no need to install/compile foreign libraries)
- no need to have callbacks (which are a pain in the neck)
- better integration into Lisp (eg you can use the condition system)
Thursday, June 26, 2008
announcement: minpack package
I have been using a simple solver (based on Broyden's method) to finds roots of systems of nonlinear equation, but I encountered an ill-behaving class of problems that required heavier artillery.
Numerical methods have made a lot of progress in the last 50 years. Methods presented in introductory textbooks are quite straightforward and very simple to code, but do not cut the mustard when it comes to more difficult situations (eg when you don't have a good initial guess, your function looks like the fjords of Norway, etc).
State of the art methods are powerful, but they are tricky to program: the main idea is easy to grasp, but one has to cover a lot of special cases (eg line-search, niceties of trust-region methods) so implementing them from scratch takes a lot of time (and debugging). This is why most researchers rely on Fortran (or most recently, C) packages of these methods.
Common Lisp users generally have two alternatives if they don't want to implement these methods from scratch. They can use the foreign code directly via the FFI, or translate the code using f2cl, which is available as part of CLOCC. I found the second option more appealing, for the following reasons:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment