DotNumerics, AlgLib, dnAnalytics, Math.net, F # for Numerics, Mtxvec?

I searched Google and Qaru as crazy for a few days and have not yet found any last, fully relevant information to answer the following question: What are the best C # / F # /. NET math libraries (specifically those that wrap or implement the same functions as Lapack, etc.)?

One of the best stack overflow posts I've seen was: https://stackoverflow.com/questions/3227647/open-source-math-library-for-f

The reason this publication and other previous posts didn’t fully answer my question was because a systematic comparison of user experience with different libraries was not provided.

I wonder how fully the following libraries (in real use) implement Lapack (or a wide range of equivalent linear algebra of functionality); and, They are interested about their work relative to each other, especially on very large matrices. Also, Id like to hear about other events using various libraries: difficulties, ease of use, etc.

Below is a complete list of "free" / open source / available math libraries. NET / F # / C #, which, as far as I know, have a set of functions of linear algebra. Id deeply appreciated this if the community here on Stack Overflow got caught up with any experience they have with the following libraries:

I am interested in F # for Numerics (since Im works with F #), but Im can hardly find out the strengths and weaknesses of various libraries. How, what functions are missing or included in various libraries, and how easy they are to use and how well they perform.

DotNumerics seems like a comprehensive implementation of Lapack in C #, but I can't find anyone who shared their experiences with it. Math.NET seems that in the end it can be a great, comprehensive mathematical library for .NET, but it’s hard to say how active the project is, and it seems to have a very strong impact on the current stage. Alglib say that they were solid once or twice, but Id like to relate more to others about it. I like the idea of ​​supporting the native F # number library, but I'm not sure how committed the developer (Flying Frog Consultancy) is to support and develop F # for Numerics ... and what functionality they plan to include in their version 1.0 and what is their target date for release 1.0.

+19
math libraries f # linear-algebra
Nov 11 2018-10-11
source share
3 answers

One common mistake in choosing a math library is that we hope that there is a math library for everything.

Before you find a library, you must 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.

Below are my comments on the libraries on your list (the last two I have not used):

1) DotNumerics

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

They use the fortran2C # translator, which translates the Lapak procedure code into C # classes. C # handy wrappers are written for raw Lapack classes.

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

This library is available in several languages, such as delphi, c ++ and C #. I believe that it has a longer history than any other libraries you have listed.

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

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

This library now merges with Math.Net. It seems the merger is not over yet. Some features in dnA are still not available in Math.Net.

4) Math.NET ( http://www.mathdotnet.com/ ). Its implementation from scratch, that is, it is not a direct translation from Lapack. They strive to provide a cleanly managed library for the .Net platform. This means that ease of use and mobility are two main goals. One problem is whether their own implementation is correct or not. It's good that this library is portable in the sense that you can use it on Mono, XNA, Windows Mobile Phone without much effort.

The above libraries do not focus on F #. However, one of the team members at Math.Net works at MS Research Cambridge and is an F # expert. As Cuda said, they will develop the F # interface for the library. They will also provide native wrappers. But maybe you will wait a long time, longer than "a few months" :)

Due to their high performance, the above libraries do not provide built-in wrappers (at least for now). If you need your own + .Net performance, you'd better use a commercial library. There are several open source solutions:

1. http://ilnumerics.net/ This is a solution for .Net. They are PInvoke to Lapack dll (for example, non-optimized lapack in netlib, optimized versions from AMD and Intel.)

2. The math provider in F #. read my answer to this question . Since the source code F # is now open. I can review the library and release my updates :)

Usually you do not need a large math library. You just need some functionality, for example, if you need a quick matrix multiplication procedure, using PInovke for the BLAS DLL, optimized for the platform, is the easiest way. If you need to make educational mathematical software for children, then the quality of Math.net is enough. If you work in a company and develop reliable mathematical components, then why not use a commercial component supported by a high-quality team?

Finding the perfect math library is hard. But finding a library solution to your problem is usually easy.

+16
Nov 12 '10 at 6:12
source share

F # for Numerics is my company's product, written in 100% F #. Our emphasis is on general methods (everything from FFT to random number generation), and not in specific linear algebra, although the basic procedures of linear algebra (Cholesky, LU, QR, SVD for various types of matrices / elements) are provided, and we are particularly interested in simplicity use from F #.

If you are after the full width of LAPACK, then my recommendations are Alglib , if you are on a budget or Extreme Optimization , if you can afford it. Alglib is fully managed code with a nimble API, so it is rather slow and cumbersome to use. Extreme optimization is a more convenient API that includes Intel MKL and some additional procedures, so it is easier to use and much faster to run.

I must warn you that the overall quality of .NET libraries (free, commercial, and even the infrastructure itself) is relatively small if you come from an open source background. I tried many of the other libraries you mentioned and did not impress them.

+10
Nov 12 '10 at
source share

I also suggest looking at a new .net-digital library called FinMath , which I used in my development. It provides easy-to-use .net class shells for a large number of MKL libraries (the Intel mathematical core library on which it is based), such as linear algebra (BLAS and LAPACK), statistics, and FFTs. In addition, it contains a number of advanced methods, such as linear and quadratic software solver, cluster analysis and others. It also includes various .net optimizations for native c-marshaling, which results in high performance and ease of use for a single DLL.

But, unfortunately, it is not open source, not free and, unlike LAPACK, most methods only support double-precision floating-point values. And for some rarely used LAPACK methods, a wrapper is not provided.

+1
Nov 10 2018-11-11T00:
source share



All Articles