Ruby的核心矩阵VS NArray的NMatrix [英] Ruby core Matrix vs NArray's NMatrix
问题描述
有似乎是红宝石3矩阵模块,我发现
There seems to be three matrix modules in Ruby that I've found
- Matrix: Part of core Ruby it seems
- NArray: NMatrix is part of the NArray library (github)
- NMatrix: Part of SciRuby
目前看来此刻的 NMatrix
比矩阵更快
NArray
code>,有一些有用的方法,但需要多一点的设置。
At the moment it seems NArray
's NMatrix
is faster than Matrix
, has some more helpful methods, but require a bit more setup.
是否有与两个的经验的人谁可以给我为什么要使用一个比其他一个粗略概述?
Is there anyone with experience of both who can give a rough overview of why I should use one over the other?
推荐答案
就磕磕绊绊对这个问题现在...它已有7个月以来你问,所以我敢肯定你现在找到你的答案。
Just stumbling on this question now... It's been 7 months since you've asked, so I'm sure you've found your answer by now.
不过,请在这里查找信息。
However, please find information here.
基本上,核心Matrix类的作者没有添加方法一旦被实例化进行运行时修改数组。在 NArray 类允许这一点。
Basically, the author of the core Matrix class did not add methods to perform run-time modifications to the array once it is instantiated. The NArray class allows for this.
据计算时间,我会留给别人,因为我不知道。
As far as computation time, I'll leave that to somebody else, for I don't know.
这篇关于Ruby的核心矩阵VS NArray的NMatrix的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!