MyNixOS website logo
Description

Bindings to L-BFGS-B, Fortran code for limited-memory quasi-Newton bound-constrained optimization.

Bindings to L-BFGS-B, Fortran code for limited-memory quasi-Newton bound-constrained optimization.

L-BFGS-B is a Fortran library for limited-memory quasi-Newton bound-constrained optimization written by Ciyou Zhu, Richard Byrd, Jorge Nocedal and Jose Luis Morales. More information can be found on its homepage http://users.eecs.northwestern.edu/~nocedal/lbfgsb.html, or in [1].

The L-BFGS-B Fortran code is not included in this package, as I consider it a dependency. This package expects to be able to link against version 3.0 of the L-BFGS-B code, as built by a relatively recent version of gfortran. Instructions on how to build L-BFGS-B as a shared library can be found at http://nonempty.org/software/haskell-l-bfgs-b.

The functions provided in this package wrap FFI calls in unsafePerformIO, which among other things means that the called L-BFGS-B code should not output anything. The relevant iprint flag is thus set negative to suppress output as specified in the L-BFGS-B code. However, there are two places in said code where the flag is ignored and output still occurs. If it bothers you that code exposed as pure prints things, see http://nonempty.org/software/haskell-l-bfgs-b for information on a simple patch for L-BFGS-B. The SciPy project has described the same behavior in https://github.com/scipy/scipy/issues/2261.

The code assumes that your Haskell compiler's Doubles are IEEE-754 doubles.

Example on usage can be found in the included examples directiory.

The current version has only been lightly tested, and should not be trusted for serious work. Feedback is appreciated.

Changes in version 0.1.0.1:

  • Check some function arguments for sanity and cause a runtime error otherwise.

  • Add note above on double representation.

  • Added TODO below.

Changes in version 0.1:

  • There has only been cursory testing, so do not trust these bindings yet.

  • Initial release.

TODO:

  • Be more generic with regards to vector types?

[1] R. H. Byrd, P. Lu and J. Nocedal. A Limited Memory Algorithm for Bound Constrained Optimization, (1995), SIAM Journal on Scientific and Statistical Computing , 16, 5, pp. 1190-1208.

Metadata

Version

0.1.0.1

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows