Fetching latest commit…
Cannot retrieve the latest commit at this time.
This is a port of the modern LAPACKE bindings to J. The original J addon for Lapack depended on CLAPACK building a functional shared library. It doesn't seem to support 64 bit linux, which is what I use, and anyway, CLAPACK is preposterously out of date. LAPACKE is apparently the modern way to do things. LAPACKE bindings make more sense, and will probably work faster. They also allow for "native" row major, amd are long term more maintainable. The important change here is lcall in lapack.ijs. It is oogly, because I am not yet good at J, but it does what it is supposed to, and will hopefully improve over time with my skills. I used the latest lapack, lapack-3.4.2 to build the library. http://www.netlib.org/lapack/#_lapack_version_3_4_2_2 Building is simple: cmake-gui cmake-gui: select build and source dirs cmake-gui: select lapacke and optimized blas if desired cmake-gui: -> configure, generate cmake . (at the command line to make sure you have the dependencies) make from there, copy lib/lapacke.so to ~/j-lapacke/lapack.so Unfortunately, distributing a shared library is presently problematic, as lapacke is linked to several things, and most Linux distributions don't have lapack libs which support the lapacke bindings. I also don't want to do this again, when linux catches up with what netlib/lapack are doing. geev seems to work, though it is not thoroughly tested. I don't understand the test script, but it ties out with values in R. I (or someone else) will eventually work through all the other files. In this order, probably NB. heev eigenvalues and eigenvectors of a square matrix (works) NB. gels solves overdetermined or underdetermined systems (works, tested) NB. gesv solves the system A * X = B (done, works; tested) NB. gesvd singular value decomposition (SVD) of a matrix (done, works, has a few oddities to think about first) NB. potrf Cholesky factorization of a symmetric (Hermitian) (works, needs numeric testing) NB. trtrs solves a triangular system A * X = B (mostly done; minor fixes needed + testing) NB. potrf Cholesky factorization of a symmetric (Hermitian) NB. positive definite matrix (numeric testing needed) NB. gees Schur factorization of a square matrix (type error) NB. getrf LU factorization of a general M-by-N matrix (sltri part doesn't work) NB. geqlf QL factorization of a M-by-N matrix (same as above) NB. geqrf QR factorization of a M-by-N matrix (same as above) NB. gerqf RQ factorization of a M-by-N matrix (same as above) NB. gehrd reduce a general square matrix to upper NB. Hessenberg form (same as above) NB. gelqf LQ factorization of a M-by-N matrix (same as above) NB. gesvx solves the system A * X = B (crashes J) NB. gelss computes the minimum norm solution to a linear (crashes J) NB. least squares problem using the SVD NB. gebal balances a general square matrix (dumps core) Mostly, this is a place to store my addons/math/lapack until this is all done. I may only get to these intermittently, as I generally have more need for eigenvalues than anything else. The pattern established in geev should be fine for all the others.