NMatrix is an experimental linear algebra library for Ruby, written mostly in C and C++. It can be used with or without SciRuby, but is part of the SciRuby project.
NMatrix was inspired by and based heavily upon NArray, by Masahiro Tanaka.
Please be aware that SciRuby and NMatrix are in PRE-ALPHA status. If you're thinking of using SciRuby/NMatrix to write mission critical code, such as for driving a car or flying a space shuttle, you may wish to choose other software (for now).
You should also be aware that NMatrix and NArray are incompatible with one another; you should not try to require both at the same time. Unfortunately, that causes problems with Ruby/GSL, which currently depends upon NMatrix. As such, we are working on an NMatrix-specific fork of Ruby/GSL.
Matrix storage containers: dense, yale, list (more to come)
Data types: int8, int16, int32, int64, float32, float64, complex64, complex128, rational64, rational128 (incomplete)
Very basic algebra (more to come)
For full instructions, please see sciruby.com/nmatrix. Generally, you should be able to do
gem install nmatrix
However, you will need to install ATLAS with CBLAS first. Those directions can be found at our website.
ATLAS and LAPACK, probably
See Synopsis (above) for now. Gem coming later.
More detailed installation instructions are available at here
Code in the master branch of SciRuby/nmatrix on github should compile and link, but is not necessarily stable. You might also check out the dev branch if master hasn't been updated in some time.
git clone https://github.com/mohawkjohn/nmatrix.git
Before commiting any code, you MUST read our Contributor Agreement.
Copyright © 2012, The Ruby Science Foundation.
All rights reserved.
NMatrix, along with SciRuby, is licensed under the BSD 2-clause license. See LICENSE.txt for details.