C++ Numerical Libraries

I haven been searching for C++ numerical libraries for scientific calculation. As I have come to several alternatives in the internet, so I decided to put it here.

Ceemple

URL: http://www.ceemple.com

Thanks for dropping a comment on this blog. I will try this one out.

IT++

URL: http://itpp.sourceforge.net/

Now this is my favorite, though Armadillo seems to be promising also. I have left Octave since I have to hack around to get certain functions to work, but not so with IT++.

Armadillo

URL: http://arma.sourceforge.net/

It looks promising, but still in early development. Armadillo 0.2.0 just out, the bug in eigen solver has been fixed.

Octave C++

URL: http://www.octave.org

Once you have installed octave, then you can use the C++ libraries. To read more on how to write a stand alone C++ code using liboctave, you can refer to my previous post:

https://techlogbook.wordpress.com/2008/09/19/writing-mixed-code-octav-e-and-c/

Some disadvantage is that it is pretty difficult to utilize the built-in functions. Most of the built-in functions are meant to be called from Octave interactive, not C++.

Gmm++

URL: http://home.gna.org/getfem/gmm_intro

This a simpler library compared to MTL2. It is used by Getfem++ by the same author.

MTL 2 and MTL 4

URL: http://www.osl.iu.edu/research/mtl/

MTL 4 is rather different than MTL 2. MTL 4 overloads many operators so that you can write C=A*B kind to solve linear problems. However, the development of MTL 4 is still in alpha. MTL2 has a better documentation.

NST++

URL: http://www.telemed.no/index.php?id=550350

This is developed by Norwegian Center for Telemedicine.  The program tried to achieve Matlab functionality using GSL libraries. However, I am unable to use it so far. It can’t compile. I will update again once it succeeds.

GSLWrap

URL: https://sourceforge.net/projects/gslwrap/

This is a C++ wrapper for GSL Libraries.

GSL–

URL: http://cholm.home.cern.ch/cholm/misc/gslmm/

This is also another GSL library wrapper in C++.

Flens

URL: http://flens.sourceforge.net/index.html

Similar to Gmm++ and MTL. I am trying it now.

Advertisements

14 Responses

  1. First of all thank you for useful information in this page and related articles around this blog.

    I am a bit confused about GSL and Octave. I am a C/C++ Developer but new to scientific libraries for C/C++. I want a comparison table between Octave & GSL regarding functionality and speed.

    Why didn’t use GSL and opt Octave? Could you please explain more …

  2. Hi Mani,
    I have not done any thorough comparison. But Octave is primarily used interactively like Matlab. It is just that the libraries can be used to write your own C++ code. It has a lot of functions and it can call GSL also. It can use Suitesparse for sparse matrix. However, to use it you have to install the whole Octave.

    GSL is mostly written in C, so some people tried to write a C++ wrapper for it. Actually there are other C++ libraries such as Blitz++ and uBlas. But I don’t really have much time to try it. For my needs, I need matrix operation and some mathematical special function. So I think the best is to use some Matrix library and GSL.

  3. @kurniawano: Thank you very much for your answer, I will surf around more and write some sample codes. If I get anything valuable to blog, I’ll let you know 🙂

  4. The eigensolver in Armadillo should work now. Let me know if you have any particular requests for functionality.

  5. some other C++ numerical Libraries that I know:
    eigen
    Boost uBlas ()
    Blitz
    POOMA
    TNT
    Lapack++
    eigen seems quite promising (Includes fixed size and dynamic size Matrices and uses expression templates (like Armadilla, UBLas, Blitz,.. do)

  6. My 2 cents go to eigen.

    http://eigen.tuxfamily.org/index.php?title=Main_Page

    It is fantastic for it’s purpose.

  7. Hi
    Does anyone of you know how to solve algebraic riccati equation in C++/ C. Octave has a function called “are” in the controls function list, but have not been able to figure out how to use this functionality in my c code. Any suggestions is valuable.

  8. just want to say nice links. thanks for them. I was searching some for my new project…

  9. Also have a look at Eigen http://eigen.tuxfamily.org

  10. I can’t seem to look at this page from my droid!

  11. If you want to combine ease-of-use and high performance you have to go with FLENS

    http://flens.sf.net

  12. Of course, what a great website and illuminating posts, I definitely
    will bookmark your blog.Best Regards!

  13. Ceemple is a new C++ based technical computing environment, that integrates many C++ scientific libraries, such as Armadillo, NumPy, LAPACK, BLAS and many more. It also includes an immediate response Just-In-Time compiler.

    Free download available through http://www.ceemple.com.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: