Ask HN: Good C++ Numerical Libraries
9 comments
I'm doing graphics research, and the numerical libraries is probably slightly different, but the ones I've found useful are:
http://math.nist.gov/tnt/
http://eigen.tuxfamily.org/index.php?title=Main_Page
http://www.cgal.org/
Also, I can't recommend "Numerical Recipies in C++" enough. This is a great book if you're not a wizard already, although the seriously good numerical mathematicians complain that it doesn't necessarily show you the absolute best way to do everthing. Its a great learning and example-code resource though! http://www.amazon.com/Numerical-Recipes-C-Scientific-Computi...
Also, I can't recommend "Numerical Recipies in C++" enough. This is a great book if you're not a wizard already, although the seriously good numerical mathematicians complain that it doesn't necessarily show you the absolute best way to do everthing. Its a great learning and example-code resource though! http://www.amazon.com/Numerical-Recipes-C-Scientific-Computi...
"Numerical Recipies" is a good book, but you do have to keep in mind that it was mostly written several years ago, and this is a field where a lot of people are actively researching a lot of topics, and not just the obscure/niche ones.
I recently did a fair bit of work with matrix computations, for example, and while "Numerical Recipies" and "Matrix Computations" were both useful for background material, the technical notes that go with LAPACK were often far more up-to-date (and a source of the latest research papers behind the LAPACK implementations as well).
I recently did a fair bit of work with matrix computations, for example, and while "Numerical Recipies" and "Matrix Computations" were both useful for background material, the technical notes that go with LAPACK were often far more up-to-date (and a source of the latest research papers behind the LAPACK implementations as well).
Boost.uBlas: http://www.boost.org/doc/libs/1_39_0/libs/numeric/ublas/doc/...
A good C++ library for high performance computing is going to be more than just C-style functions wrapped in a class. Read the paper on Expression Templates by Todd Veldhuizen: http://ubiety.uwaterloo.ca/~tveldhui/papers/Expression-Templ...
A good C++ library for high performance computing is going to be more than just C-style functions wrapped in a class. Read the paper on Expression Templates by Todd Veldhuizen: http://ubiety.uwaterloo.ca/~tveldhui/papers/Expression-Templ...
I gave up and used Matlab to generate C++ libraries.
Can you recommend any good resources/tutorials for this?
Sure, this PDF should give you all the info you need:
http://www.apc.univ-paris7.fr/~beau/IMG/pdf/cppmath_ug2b.pdf
Scribd: http://www.scribd.com/doc/15194614/MATLAB-C-Libraries
Scribd: http://www.scribd.com/doc/15194614/MATLAB-C-Libraries
http://www.research.att.com/~bs/C++.html#libraries
Also, __the__ templates books is very useful for several tricks for squeezing performance: http://www.josuttis.com/tmplbook/
HTH
Also, __the__ templates books is very useful for several tricks for squeezing performance: http://www.josuttis.com/tmplbook/
HTH
The Intel Math Kernel Library is decent, and very fast. It has disadvantages - not optimized for AMD processors, not free (but the student version is cheap, and the free trial does not really expire).
The best modern C++ numerical library I came across is Eigen: http://eigen.tuxfamily.org/index.php?title=Main_Page
Miracl is one.
The best advice I can give you is: read Nuclear Phynance. It's a truly great forum for practitioners:
http://www.nuclearphynance.com
There you can read a lot about implementing numerical software in the "real world". My perception is that C# is starting to take C++'s place. But, then, it's just a perception. Moreover, take a look at LAPACK, LAPACK++, BLAS, and the like...
http://www.nuclearphynance.com
There you can read a lot about implementing numerical software in the "real world". My perception is that C# is starting to take C++'s place. But, then, it's just a perception. Moreover, take a look at LAPACK, LAPACK++, BLAS, and the like...
I thank any posters ahead of time.