I am looking to use the matrix class shown here:
http://rosettacode.org/wiki/Cholesky_decomposition#Ruby
in my rails app. I have copied the class into lib/matrix.rb
In my view page I have tried to test this class by using the code:
<%= Matrix[[25,15,-5],[15,18,0],[-5,0,11]].cholesky_factor %>
However I get the error message:
undefined method `cholesky_factor' for Matrix[[25, 15, -5], [15, 18, 0], [-5, 0, 11]]:Matrix
Is there something I am doing wrong? (I have the require 'matrix' line in lib/matrix.rb too)