【问题标题】:How to calculate the inverse of a matrix with ILNumerics ILMath in c#?如何在 C# 中使用 ILNumerics ILMath 计算矩阵的逆?
【发布时间】:2014-05-09 10:47:44
【问题描述】:

抱歉这个(非常基本的)问题。

我今天刚决定尝试 ILNumerics 用于我的相对简单的算法,这些算法基本上是指简单的代数运算和相对基本的优化。

我的第一印象很简单, - ILNumerics 更容易理解(例如,Math.Net 库), - 易于习惯语法, - 与其他库相比,转换为其他(主要是系统类型)更加整洁。

幸运的是,我遇到了乘法和转置,但是,我对 INVERSE FUNCTION 没有那么幸运。

我尝试了此链接建议的解决方案: How to use ILMath.invert function?

基本上,逆计算如下:

ILArray<double> A = ILMath.rand(5,5);
ILArray<double> B = ILMath.linsolve(A, ILMath.eye(5, 5));

但是,当我复制/粘贴并尝试相同的方法来计算矩阵的逆时,出现以下错误:

An unhandled exception of type 'System.DllNotFoundException' occurred in ILNumerics.dll
Additional information: Unable to load DLL 'mkl_custom': 
The specified module could not be found. (Exception from HRESULT: 0x8007007E)

**

我做错了什么?这里缺少什么?如何解决?

感谢任何帮助。

在此先感谢您花时间解决此问题。

【问题讨论】:

标签: c# ilnumerics


【解决方案1】:

只需使用 nuget 包“ILNumerics”。这会将所有需要的二进制文件导入您的项目并将文件复制到输出目录。

@Edit:不再维护 nuget 包。新的 ILNumerics Ultimate VS 通过将二进制文件直接安装到您的 System32 文件夹中,更好地解决了这个问题。这对机器上的所有项目执行一次。 http://ilnumerics.net/download.html

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多