DotNumerics、AlgLib、dnAnalytics、Math.net、F# for Numerics、Mtxvec? [英] DotNumerics, AlgLib, dnAnalytics, Math.net, F# for Numerics, Mtxvec?

查看:29
本文介绍了DotNumerics、AlgLib、dnAnalytics、Math.net、F# for Numerics、Mtxvec?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经疯狂地搜索 Google 和 Stack Overflow 好几天了,但还没有找到任何最近的、完全相关的信息来回答以下问题:什么是最好的 C#/F#/.NET 数学库(特别是,那些包装或实现与 Lapack 等功能相同的功能的那些)?

I’ve been searching Google and Stack Overflow like crazy for days and have yet to find any recent, completely relevant information to answer the following question: What are the best C#/F#/.NET math libraries (specifically, those that wrap or implement the same functionality as Lapack, etc.)?

我确实看到的关于 Stack Overflow 的更好的帖子之一是:https://stackoverflow.com/questions/3227647/open-source-math-library-for-f

One of the better posts on Stack Overflow that I did see was: https://stackoverflow.com/questions/3227647/open-source-math-library-for-f

那篇帖子和之前的其他帖子没有充分回答我的问题的原因是,没有对不同库的用户体验进行系统比较.

The reason that that post, and other previous posts, didn’t sufficiently answer my question was that no systematic comparison of user experiences with various libraries was given.

我对以下库(在实际使用中)如何完全实现 Lapack(或一组广泛的等效线性代数功能)感兴趣;而且,我很好奇它们相对于彼此的性能,尤其是在非常大的矩阵上.另外,我想听听其他人使用各种库的经验:困难、易用性等.

I’m interested in how completely the following libraries (in real-world usage) implement Lapack (or a broad set of equivalent linear algebra of functionality); and, I’m curious about their performance relative to each other particularly on very large matrices. Also, I’d like to hear about others’ experiences utilizing the various libraries: difficulties, ease of use, etc.

以下是免费"/开源/负担得起的 .NET/F#/C# 数学库的完整列表,据我所知,这些库具有线性代数功能集.如果 Stack Overflow 上的社区能够分享他们对以下库的任何经验,我将深表感谢:

Below is a comprehensive list of the "free"/opensource/affordable .NET/F#/C# math libraries which – as far as I know – have a linear algebra feature set. I’d deeply appreciate it if the community here on Stack Overflow would chip in with any experiences they have with the following libraries:

我对 F# for Numerics 感兴趣(因为我正在使用 F#),但我很难确定各种库的优缺点.例如,各种库中缺少或包含哪些功能,以及它们的使用难易程度和性能.

I’m interested in F# for Numerics (since I’m working with F#) but I’m having difficulty ascertaining the strengths and weaknesses of the various libraries. Like, which features are missing or included in various libraries, and how easily they are used and how well they perform.

DotNumerics 似乎是 C# 中 Lapack 的综合实现,但我找不到任何人在任何地方分享他们的经验.Math.NET 似乎最终可能成为 .NET 的一个优秀的、综合性的数学库,但很难说这个项目有多活跃,而且它在当前阶段似乎在不断变化.Alglib 曾一两次被认为是可靠的,但相对于其他人,我想更多地了解它们.我喜欢支持原生 F# 数字库的想法,但我不确定开发人员(Flying Frog Consultancy)对支持和开发 F# for Numerics 的承诺程度……以及他们计划在 1.0 版本中包含哪些功能以及他们的哪些功能目标日期是 1.0 版本.

DotNumerics seems like a comprehensive implementation of Lapack in C#, but I can’t find anyone who’s shared their experiences with it anywhere. Math.NET seems like it could eventually be an excellent, comprehensive math library for .NET, but it’s difficult to tell how active the project is and it seems that it’s very much in flux in its current stage. Alglib has been spoken of once or twice as being solid, but I’d like to hear more about them relative to others. I like the idea of supporting a native F# numerics library, but I’m not certain how committed the developer (Flying Frog Consultancy) is to supporting and developing F# for Numerics… and what functionality they plan to include in their 1.0 release and what their target date is for a 1.0 release.

推荐答案

选择数学库的一个常见陷阱是,我们希望有一个适用于所有事物的数学库.

One common pitfall of choosing math library is that we hope there exists a math library for everything.

在找图书馆之前,你应该先问我想要什么样的数学图书馆?".然后你会有一个标准列表,比如开源与否,高性能与否,便携与否,易用与否.

Before finding a library, you should first ask "what kind of math library do I want?". Then you will have a list of criteria, such as open source or not, high performance or not, portable or not, easy to use or not.

以下是我对您列表中的库的评论(最后两个我没有使用过):

Following are my comments on the libraries in your list (I haven't used the last two):

1) 点数字

(http://www.dotnumerics.com/)

他们使用 fortran2C# 转换器将 Lapack 过程代码转换为 C# 类.用户友好的 C# 包装器是为原始 Lapack 类编写的.

They use a fortran2C# translator that translates the Lapack procedures code into C# classes. User friendly C# wrappers are written for the raw Lapack classes.

2) Alglib (http://www.alglib.net/)

这个库有多种语言版本,如 delphi、c++ 和 c#.我相信它的历史比您列出的任何其他图书馆都要长.

This library is available in several languages, like delp c++ and c#. I believe it has longer history than any other libraries you listed.

大部分函数都是从 Lapack 翻译过来的.而且它的界面不是那么用户友好.(但您拥有 Lapack 风格界面的灵活性.)使用 lapack 风格界面意味着您需要更多地了解矩阵及其操作.

Most of the functions are translated from Lapack. And its interface is not so user friendly. (But you have the flexibility of Lapack style interface.) Using lapack style interface means that you need to know more about the matrix and its operations.

3) dnAnalytics(http://dnanalytics.codeplex.com/)

这个库现在正在合并到 Math.Net 中.似乎合并还没有完成.dnA 中的一些函数在 Math.Net 中仍然不可用.

This library is merging into Math.Net now. It seems that the merging is not done yet. A few functions in dnA is still not available in Math.Net.

4) Math.NET(http://www.mathdotnet.com/)它的实现是从头开始的,也就是说,它不是 Lapack 的直接翻译.他们旨在为 .Net 平台提供一个纯粹的托管库.这意味着易于使用和便携性是两个主要目标.一个问题是他们自己的实现是否正确.一件好事是这个库是可移植的,因为您可以毫不费力地在 Mono、XNA、Windows Mobile Phone 上使用它.

4) Math.NET (http://www.mathdotnet.com/) Its implementation is from scratch, i.e., it is not a direct translation from Lapack. They aim to provide a purely managed library for .Net platform. That means easy usage and portability are two primary goals. One concern is that whether their own implementation is correct or not. One good thing is that this library is portable in the sense that you can use it on Mono, XNA, Windows Mobile Phone with little effort.

上述库不关注 F#.然而,Math.Net 的一名团队成员为 MS Research Cambridge 工作,并且是 F# 专家.就像 Cuda 所说的,他们将为库设计一个 F# 接口.他们还将提供本机包装器.但也许你会等待很长时间,比几个月"还长:)

The above libraries dont' focus on F#. However one of the team members in Math.Net works for MS Research Cambridge and is an F# expert. Like Cuda said, they will work out an F# interface for the library. Also they will provide native wrappers. But maybe you will wait a long time, longer than "several months" :)

出于高性能的考虑,上述库不提供原生包装器(至少现在是这样).如果你想要原生性能+.Net,你最好使用商业库.有一些开源解决方案:

For the concern of high performance, the above libraries don't provide native wrappers (at least now). If you want native performance + .Net, you had better use a commercial library. There are some open source solutions:

1.http://ilnumerics.net/ 这是一个类似 .Net 的 numpy 解决方案.他们 PInvoke 到 Lapack dll(例如 netlib 上未优化的 lapack,来自 AMD 和 Intel 的优化版本.)

1. http://ilnumerics.net/ This is a numpy like solution for .Net. They PInvoke to Lapack dlls (e.g. the non-optimized lapack at netlib, the optimized versions from AMD and Intel.)

2.F# 中的数学提供者.阅读我在这个问题中的回答.由于 F# 源代码现在是开源的.我可能会修改库并发布我的更新:)

2. math provider in F#. read my answer in this question. Since F# source code is now open sourced. I may revise the library and release my updates :)

通常您不需要大型数学库.您只需要一些功能,例如,如果您需要快速矩阵乘法过程,则将 PInovke 用于平台优化的 BLAS dll 是最简单的方法.如果您需要为孩子做一个面向教育的数学软件,那么 Math.net 的质量就足够了.如果您在一家公司并开发可靠的数学组件,那么为什么不使用由高质量团队支持的商业组件呢?

Usually you don't need a big math library. You just need some functionality, e.g., if you need a fast matrix multiplication procedure, using PInovke to a platform optimized BLAS dll is the easiest way. If you need do a education oriented math software for kids, then the quality of Math.net is enough. If you are in a company and developing reliable math components, then why don't use a commercial one backed by a high-quality team?

找到一个完美的数学库很难.但是为您的问题找到一个库解决方案通常很容易.

这篇关于DotNumerics、AlgLib、dnAnalytics、Math.net、F# for Numerics、Mtxvec?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆