2014-05-09 55 views
2

對不起,這個(非常基本)的問題。如何用c#中的ILNumerics ILMath計算矩陣的逆?

我只是決定今天嘗試ILNumerics爲我相對簡單的算法,基本上是指簡單的代數運算和相對基本的優化。

我的第一印象是簡單的, - ILNumerics是更容易理解(比,例如,Math.Net庫), - 容易習慣的語法, - 鑄造到其他(主要是系統類型)比其他庫更加整潔。

我幸運地與乘法和轉置相交,但是,我對反函數沒有那麼幸運。

我試圖解決方案建議在此鏈接: 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) 

**

我在做什麼錯?這裏缺少什麼?如何解決它?

任何幫助表示讚賞。

在此先感謝那些專注於此問題的人。

+0

根據此:http://stackoverflow.com/questions/17673326/beginner-ilnumerics-install-under-vs2012你應該把你的平臺的二進制文件直接放在輸出路徑中。 – David

回答

1

只需使用nuget包'ILNumerics'即可。這會將所有必需的二進制文件導入到您的項目中,並將這些文件複製到輸出目錄。

@編輯:nuget包不再維護。新的ILNumerics Ultimate VS通過將二進制文件直接安裝到System32文件夾中甚至更好地解決了這個問題。這是爲機器上的所有項目完成的。 http://ilnumerics.net/download.html