Scientific calculations such as linear algebra on. NET (RPM)

Source: Internet
Author: User
Tags lapack

Link:http://www.cnblogs.com/redmoon/archive/2011/03/29/1999242.html

For the engineering class, graphics and other professional software, need a lot of mathematical calculations, and the most used is the calculation of linear algebra.

So, on top of. NET, and above all, how do you complete the related linear algebra calculations above. NET 4.0 and VS2010? I think there are several ways:

One, self-action, food and clothing: according to the needs of their own software, incremental development of a number of function libraries. The biggest problem in this way is the re-production of wheels, so most of it is generally not appropriate to use this approach.

Second, the use of open source (or free) components: The advantage of this approach is that there are many excellent open source (or free) tools to choose from, the disadvantage is that it requires a large learning cost.

Third, the use of commercial components: This approach to the second advantage is that the support and services are guaranteed, the disadvantage is self-evident is the cost is higher.

Below, I will highlight in. NET platform is available with open source (free) components.

1, developing with F #

As a mixed language (functional language + object-oriented language), F # has the advantage of doing mathematical calculations from the start. Not only is it more natural to write computational code, but the function library of F # also provides good support for mathematical calculations.

Namespaces that contain Microsoft.FSharp.Math in F # 's Powerpack are designed for mathematical calculations. It provides a matrix type-a type that is very common and important in the calculation of linear algebra.

For the matrix type you can read the help here. You can also refer to this blog:http://fdatamining.blogspot.com/2010/03/matrix-and-linear-algebra-in-f-part-i-f.html

However, for efficient linear algebra calculations, F # also needs an external library of functions, but F # has provided the appropriate interface to facilitate the integration of external libraries, That is FSharp.PowerPack.Math.Providers.dll (this assembly is only available in FSharp-1.9.7.8).

For example, F # can integrate LAPACK ( LAPACK , which is named L inear  A lgebra  PACK Age is an acronym for fortran programming language written, used for function set . LAPACK provides a rich tool function , which can be used to solve multiple , minimum squared solution, calculated characteristic vector , used to calculate Span style= "color: #0066aa;" > matrix QR decomposition householder conversion , and odd value decomposition, and so on. In netlib also provides fortran  95 version of LAPACK95. Lapack to bsd the method of granting the rights . )

The specific integration method can be consulted:http://fdatamining.blogspot.com/2010/03/matrix-and-linear-algebra-in-f-part-ii.html, Http://fdatamining.blogspot.com/2010/03/compiling-lapack-for-net-usage.html

Here's an example of how to do algebraic operations in F #:http://fdatamining.blogspot.com/2010/04/matrix-and-linear-algebra-in-f-part-iii.html

In fact, I quoted above the blog address:http://fdatamining.blogspot.com/ are worth reading.

2, using IronPython for development

Python is not a functional language, but its dynamic language features and code style are also used by many people for engineering development. On top of Python is a well-known mathematical library-NumPy and SciPy, which is also ported to. NET (the porting process is with Microsoft's help).

The best way to use these two libraries is through python Tools for Visual Studio-A Python integrated development environment implemented in VS2010.

Specific usage wizards can be accessed by:Http://pytools.codeplex.com/wikipage?title=NumPy%20and%20SciPy%20for%20.Net

3, development using C #

In. NET 4.0, the System.numerics namespace was added to provide a basis for mathematical calculations, but in. NET there is also a library of computational functions with no built-in linear algebra. But to use C # development, the Lapack and scipy mentioned above can be used.

For Lapack, there are also. NET version, that is:dotnumerics

Of course, there are many third-party open source, free and commercial components available.

Let's take a look at the following, as well as those components:

    1. Extreme optimization numerical Libraries for. NET(commercial)
    2. . NET Matrix Library(business)
    3. Nmath. NET(Business)
    4. NAG Library for. NET(commercial)
    5. SCINET(commercial)
    6. math.net(open source)
    7. Dambach Linear Algebra Framework(open source)
    8. ilnumerics.net(open source)
    9. mapack(open source, our LCA software is the use of this, in fact, I made a provider can be arbitrarily switched to other libraries, I will write a blog later to introduce)
    10. meta.numerics(free)

In addition, for the use of which language for scientific computing and development, you can refer to this blog some of the discussion:C#-f#-ironpython and scientific calculation , of course, the individual feel that F # and IronPython are suitable for scientific calculation.

Scientific calculations such as linear algebra on. NET (RPM)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.