U
Une Bévue
is there algo allready implemented to find eigenvalues, eigenvectors in
Ruby ???
for symetrical matrices ?
Ruby ???
for symetrical matrices ?
You can use rb-gsl to do that. http://rb-gsl.rubyforge.org/eigen.htmlue said:is there algo allready implemented to find eigenvalues, eigenvectors in
Ruby ???
for symetrical matrices ?
is there algo allready implemented to find eigenvalues, eigenvectors in
Ruby ???
for symetrical matrices ?
Datum: Tue, 20 Nov 2007 19:50:14 +0900
Von: (e-mail address removed)
An: (e-mail address removed)
Betreff: [Matrix] eigenvalues, eigenvectors in Ruby ???
is there algo allready implemented to find eigenvalues, eigenvectors in
Ruby ???
for symetrical matrices ?
Axel said:-------- Original-Nachricht --------Datum: Tue, 20 Nov 2007 19:50:14 +0900
Von: (e-mail address removed)
An: (e-mail address removed)
Betreff: [Matrix] eigenvalues, eigenvectors in Ruby ???is there algo allready implemented to find eigenvalues, eigenvectors in
Ruby ???
for symetrical matrices ?
As far as I know, there is nothing like that in the "matrix.rb" Matrix
class, but you can find this information by using Ruby bindings to GSL
http://rb-gsl.rubyforge.org/
or, alternatively, via the bindings to the R statistical language,
http://raa.ruby-lang.org/project/rsruby/
Best regards,
Axel
is there algo allready implemented to find eigenvalues, eigenvectors in
Ruby ???
for symetrical matrices ?
One of the Summer of Code projects extends Matrix to do most of the
common matrix operations. Try
http://rubyforge.org/projects/matrix
Datum: Wed, 21 Nov 2007 00:47:45 +0900
Von: "Cameron McBride" <[email protected]>
An: (e-mail address removed)
Betreff: Re: [Matrix] eigenvalues, eigenvectors in Ruby ???One of the Summer of Code projects extends Matrix to do most of the
common matrix operations. Try
http://rubyforge.org/projects/matrix
That's kind of neat, I missed it. Thanks.
Do you know right off how its accuracy compares to GSL/LAPACK routines?
Alex Shulgin said:Take a look at RNum: http://rnum.rubyforge.org/
Ruby Numerical Library is a linear algebra package using Blas and
Lapack (the highly regarded scientific libraries originally written in
FORTRAN.)
Axel Etzold said:Am I wrong in thinking that you can use that library without being
forced to calculate in Floats, i.e. can one use Rationals, Sqrts,
continued fractions, whatever as matrix entries ?
Cameron McBride said:For yet another working suggestion, NArray has an extension to do
eigenvalues and eigenvectors based on lapack.
yes i had this prob with gsl, my matrices (coming from chemistry then
having only integer numbers...) print out with -0.000e+00 for 0 and
1.000e+00 for 1 ...)
Datum: Wed, 21 Nov 2007 04:35:00 +0900
Von: (e-mail address removed)
An: (e-mail address removed)
Betreff: Re: [Matrix] eigenvalues, eigenvectors in Ruby ???
yes i had this prob with gsl, my matrices (coming from chemistry then
having only integer numbers...) print out with -0.000e+00 for 0 and
1.000e+00 for 1 ...)
I'll try it asap ( http://rubyforge.org/projects/matrix ) because the
readme says :
The project consists of some enhancements to the Ruby "Matrix" module
and includes: LU and QR (Householder, Givens, Gram Schmidt, Hessenberg)
decompositions, bidiagonalization, eigenvalue and eigenvector
-----------------------------------^^^^^^^^^^^----^^^^^^^^^^^
calculations.
i need also permutation matrices, whose i didn't understood in gsl...
Axel said:-------- Original-Nachricht --------Datum: Wed, 21 Nov 2007 00:47:45 +0900
Von: "Cameron McBride" <[email protected]>
An: (e-mail address removed)
Betreff: Re: [Matrix] eigenvalues, eigenvectors in Ruby ???One of the Summer of Code projects extends Matrix to do most of the
common matrix operations. Try
http://rubyforge.org/projects/matrix
Dear Ed and Cameron,
That's kind of neat, I missed it. Thanks.
Me too. Very nice.
Do you know right off how its accuracy compares to GSL/LAPACK routines?
Am I wrong in thinking that you can use that library without being
forced to calculate in Floats, i.e. can one use Rationals, Sqrts,
continued fractions, whatever as matrix entries ?
Then, its accuracy should only be limited by the space available on
the machine.
Best regards,
Axel
M. Edward (Ed) Borasky said:One of the Summer of Code projects extends Matrix to do most of the
common matrix operations. Try
http://rubyforge.org/projects/matrix
Axel Etzold said:Have a look at the example on the Wikipedia article.
http://en.wikipedia.org/wiki/Permutation_matrix#Examples
A permutation matrix has exactly one 1 entry in every row, at the
place that the permutation vector indicates (note that Ruby starts
counting at 0, so the permutation vector given in the Wikipedia article
should actually be (0 3 1 4 2)), the remaining entries are 0.
The reason to associate a vector and a matrix like this is that
due to the way multiplication of matrices is defined, multiplying
permutation_matrix*matrix
gives you the column vectors of 'matrix' shuffled as the permutation
vector indicates, i.e.
the matrix (inner arrays=rows)
[[1,1,1,1,1],[2,2,2,2,2],[3,3,3,3,3],[4,4,4,4,4],[5,5,5,5,5]]
would be mapped to
[[1,1,1,1,1],[4,4,4,4,4],[2,2,2,2,2],[5,5,5,5,5],[3,3,3,3,3]]
Datum: Wed, 21 Nov 2007 18:00:04 +0900
Von: (e-mail address removed)
An: (e-mail address removed)
Betreff: Re: [Matrix] eigenvalues, eigenvectors in Ruby ???
I've downloadd it, how do I install it ?
I've found this only file (except docs) :
/opt/local/lib/ruby/1.8/matrix.rb
Datum: Wed, 21 Nov 2007 09:25:09 +0900
Von: "M. Edward (Ed) Borasky" <[email protected]>
An: (e-mail address removed)
Betreff: Re: [Matrix] eigenvalues, eigenvectors in Ruby ???
Axel said:-------- Original-Nachricht --------Datum: Wed, 21 Nov 2007 00:47:45 +0900
Von: "Cameron McBride" <[email protected]>
An: (e-mail address removed)
Betreff: Re: [Matrix] eigenvalues, eigenvectors in Ruby ???One of the Summer of Code projects extends Matrix to do most of the
common matrix operations. Try
http://rubyforge.org/projects/matrix
Dear Ed and Cameron,
That's kind of neat, I missed it. Thanks.
Me too. Very nice.
Do you know right off how its accuracy compares to GSL/LAPACK routines?
Am I wrong in thinking that you can use that library without being
forced to calculate in Floats, i.e. can one use Rationals, Sqrts,
continued fractions, whatever as matrix entries ?
Then, its accuracy should only be limited by the space available on
the machine.
Best regards,
Axel
Yes, one of the design goals was to support Rational arithmetic. But
unless the matrix is poorly-conditioned, you shouldn't have to do so,
and for real symmetric eigensolutions, the only problem with using
floating arithmetic would be if you have some pathologically close
eigenvalues you need to separate.
I don't know about continued fractions ... I don't think that's in
there. If you want to do that, you'll need something like Maxima, Axiom
or Yacas. Or a special-purpose exact linear algebra library.
Anybody up to do a Ruby binding to Yacas? There's an R binding to it, so
it can't be too difficult. There are also Java hooks, so this may be yet
another JRuby killer app.
M. Edward (Ed) Borasky said:I don't know about continued fractions ... I don't think that's in
there. If you want to do that, you'll need something like Maxima, Axiom
or Yacas. Or a special-purpose exact linear algebra library.
Anybody up to do a Ruby binding to Yacas? There's an R binding to it, so
it can't be too difficult. There are also Java hooks, so this may be yet
another JRuby killer app.
Cameron McBride said:Do you know right off how its accuracy compares to GSL/LAPACK routines?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.