clapack.h or Template Numerical Toolkit in Visual Studio 2008
I want to 开发者_JS百科use the lapack library clapck, but how could I use it in Visual Studio 2008, in a C++ project...
Also I was reviewing Template Numerical Toolkit
Have you done something similar, what do you recommend to use with Visual Studio C++ project? Can you post a simple example with the headers that must be included?
TNT is easy enough.
#include "cmat.h"
#include "lu.h"
/*******************************
* PURPOSE: Solves a linear equation in the form of Ax = b.
*****/
using namespace TNT;
void matrix_solve(double V[9], double xb[3])
{
Matrix<double> A(3, 3, V);
Vector<int> ipiv(3);
Vector<double> b(3, xb);
LU_factor(A, ipiv);
LU_solve(A, ipiv, b);
xb[0] = b[0];
xb[1] = b[1];
xb[2] = b[2];
}
精彩评论