#include "itbase.h" using std::cout; using std::endl; using namespace itpp; #ifdef NO_LAPACK #define __THIS_PROGRAM_WILL_NOT_RUN__ #endif #ifdef NO_CBLAS #define __THIS_PROGRAM_WILL_NOT_RUN__ #endif #ifdef __THIS_PROGRAM_WILL_NOT_RUN__ int main() { cout << "LAPACK and CBLAS is needed for this test program" << endl; } #else int main() { cout << "================================" << endl; cout << " Test of Cholesky routines" << endl; cout << "================================" << endl; { cout << "Real matrix" << endl; mat X, F; bool ok = false; while (!ok) { X = randn(5,5); X = X.T()*X; // create a symmetric matrix // Make diagonal real and positive for (int i=0; i