Forum: Ruby [ANN] Ruby Linear Algebra Library 1.0.0

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Efdb04c4dac4a962d86e25361f8fd450?d=identicon&s=25 James M. Lawrence (quix)
on 2008-10-06 04:51
= Linalg - Ruby Linear Algebra Library

A Fortran-based linear algebra package.

http://linalg.rubyforge.org/

http://rubyforge.org/frs/?group_id=273

Statically-linked binaries (no dependencies required) are available for
Win32, Mac, Linux, and Cygwin.

Major features:
* Cholesky decomposition
* LU decomposition
* QR decomposition
* Schur decomposition
* Singular value decomposition
* Eigenvalues and eigenvectors of a general matrix
* Minimization by least squares
* Linear equation solving
* Stand-alone LAPACK bindings: call any LAPACK routine from directly
from ruby.

Minor features:
* Convenient iterators
* Condition numbers and condition number estimates
* Nullspace, rank, nullity
* Inverse
* Pseudo-inverse
* Determinant
* 2-norm, 1-norm, infinity-norm, Frobenius norm

This release consists of installer changes for Mac and libg2c support.
This announcement is mostly for Mac users who were previously thwarted
when they tried to install.

The 1.0.0 naming is intended to convey that the package probably won't
change much (pending an outpouring of requests), and to reflect the 2600
downloads without a bug report (installer issues aside).

Linalg was written 4.27 years ago when I needed the SVD of a general
(non-symmetric) matrix.  Rubyforge had just 272 projects and there
wasn't anything which was suitable.  (At the time I was also disinclined
to use my real name on the Internet.)

Today I would guess Linalg fills a niche for those needing to do some
quick linear algebra.  Because its scope is limited it is readily
comprehensible, and with the binary install you are running immediately.

Since all 1498 Lapack routines are available from ruby, there's also a
potential niche for those seeking to optimize bottlenecks with specific
Lapack routines.

The latest version from the repository compiles with ruby-1.9.  The test
suite (successfully) completes in half the time under 1.9.

James M. Lawrence
3bb23e7770680ea44a2d79e6d10daaed?d=identicon&s=25 M. Edward (Ed) Borasky (Guest)
on 2008-10-06 06:43
(Received via mailing list)
On Mon, 2008-10-06 at 11:50 +0900, James M. Lawrence wrote:
> = Linalg - Ruby Linear Algebra Library
>
> A Fortran-based linear algebra package.
>
> http://linalg.rubyforge.org/
>
> http://rubyforge.org/frs/?group_id=273
>
> Statically-linked binaries (no dependencies required) are available for
> Win32, Mac, Linux, and Cygwin.

If you want to dynamically link -- for example, if you have a
dynamically linked lapack-atlas on Gentoo Linux -- how difficult is it?
Atlas runs like a scalded duck on my Athlon64 X2!


> Since all 1498 Lapack routines are available from ruby, there's also a
> potential niche for those seeking to optimize bottlenecks with specific
> Lapack routines.

Yeah ... hence my question about dynamic linking above.

--
M. Edward (Ed) Borasky
ruby-perspectives.blogspot.com

"A mathematician is a machine for turning coffee into theorems." --
Alfréd Rényi via Paul Erdős
Efdb04c4dac4a962d86e25361f8fd450?d=identicon&s=25 James M. Lawrence (quix)
on 2008-10-06 10:38
M. Edward (Ed) Borasky wrote:
>
> If you want to dynamically link -- for example, if you have a
> dynamically linked lapack-atlas on Gentoo Linux -- how difficult is it?
> Atlas runs like a scalded duck on my Athlon64 X2!

It should automatically work; it links to whatever it finds as -llapack.
I just tested an ATLAS-based Linalg on Ubuntu and it runs well.  (In
fact I had forgot about ATLAS until you mentioned it.)

In Ubuntu the vanilla LAPACK is

  % sudo apt-get install lapack3-dev

while the ATLAS LAPACK is

  % sudo apt-get install atlas3-base-dev

Alternatives like atlas3-sse2-dev are also available.

What I said about the Mac was wrong -- the Mac binaries are linked to
LAPACK and BLAS libraries which appear to be present on all 10.4 and
10.5 machines (the Accelerate framework).  So it's a dynamic link, but
there are still no external dependencies.

James M. Lawrence
This topic is locked and can not be replied to.