0

I have a dense system of equations of type Ax=b to solve in my C++ program, and I was hoping to implement the solution using UBLAS in boost. In some other questions I found that people were using the extension LAPACK, but unfortunately it doesn't seem to be part of my standard boost installation (in Debian at least) and I am not allowed to add more dependencies.

Could someone paste a solution that doesn't use LAPACK or any other libraries?

Grzenio
  • 35,875
  • 47
  • 158
  • 240
  • 1
    If you are not forced to use uBlas, then have a look at http://eigen.tuxfamily.org/index.php?title=Main_Page – Anonymous Mar 30 '12 at 09:06

1 Answers1

3

Unfortunately, you're solving a linear system which either requires LAPACK or writing your own code. If you don't want LAPACK, your only other option is to write your own solver. Such a solver can use uBLAS of course.

If you need the code to do it, you can look at numerical recipes for an example. But, solving dense linear systems is a very rich subject, so it's probably beyond the scope here to address all aspects of it.

tpg2114
  • 14,112
  • 6
  • 42
  • 57
  • I second that. Writing a solver from scratch that works properly is a time consuming affair. Sticking with LAPACK is the best bet, or using a C++ library that wraps LAPACK (eg. [Armadillo](http://arma.sourceforge.net)). – mtall Dec 18 '12 at 09:48