Ruby mathematic gem

耗尽温柔 提交于 2019-12-31 21:38:08

问题


does anybody know if there is a good gem for mathematic / geometric operations? I need some of this things:

  • Dot product
  • Cross product
  • Angle between vectors
  • Matrix
  • Surface normale
  • Vector calculations (add, substract...)
  • Singular Value Decomposition

thx, tux


回答1:


I can highly recommend the Ruby/GSL gem.

You may need to refer to the GSL manual to work out the name of the function you need to call though, if it's not documented in the Ruby/GSL documentation.




回答2:


http://linalg.rubyforge.org/ seems to do what you want. It is based on LAPACK, the standard ultra tested 40-year linear algebra framework. Moreover, you can plug in vendor-specific LAPACK libraries for optimized code.




回答3:


I am not sure if this may help: http://narray.rubyforge.org




回答4:


Linalg https://github.com/wedesoft , I posted instructions how to install it here: http://www.quora.com/Installation-Instructions/How-do-I-install-Ruby-linalg-library-on-Mac




回答5:


NMatrix from the SciRuby project might be what you're looking for.



来源:https://stackoverflow.com/questions/5416655/ruby-mathematic-gem

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!