Wow, the illustrations didn''t come out the way I had hoped. Maybe
this will work better:
The base matrix is something like:
xxx
xxx
xxx
I''ll have to add other columns and rows (often more than one)
xxxy
xxxy
xxxy
000y
and also be able to remove them.
On Oct 7, 2:59 pm, Stuart
<EvanStuartAndr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> I have a large matrix (~450x450) that I need to invert and multiply.
> I''m hoping matrix.rb will do the trick for me.
>
> The interesting part is that in addition to the base 450x450, I need
> to accept new rows/columns into the matrix based on user input. So
> the base is:
>
> xxxxx and I will need to add xxxxxy or remove the y, or add
> both xxxxxyz
> xxxxx
> xxxxxy
> xxxxxyz
> xxxxx
> xxxxxy xxxxxyz
> xxxxx
> xxxxxy xxxxxyz
> xxxxx
> xxxxxy xxxxxyz
>
> 00000y 00000yz
>
> 00000zz
>
> My question is,
> (1) Where should I store these matrices? (in a static ruby
> array, or in Mysql?)
> (2) What methods will I need to manipulate the storage format
> into one that''s accessible by Matrix.rb? (see below).
>
> Thanks for your interest!
>
> Matrix.rb
>
> Matrix.rows([[25, 93], [-1, 66]])
> Creates a matrix where rows is an array of arrays, each of which is a
> row to the matrix. If the optional argument copy is false, use the
> given arrays as the internal structure of the matrix without copying.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---