Mercurial > hg > kwantix
view src/main-profiling.cpp @ 40:eaa99e09607d
Remove indentation due to namespace scope
author | Jordi Gutiérrez Hermoso <jordigh@gmail.com> |
---|---|
date | Fri, 12 Mar 2010 09:21:07 -0600 (2010-03-12) |
parents | 7f31f9e2d196 |
children |
line wrap: on
line source
#include <ctime> #include <iostream> #include "include/linalg.hpp" #include "include/rbf.hpp" #include "include/utils.hpp" #define P1 12.21331231231 #define P2 5.435765745 #define Q1 4.23422342 #define Q2 3.32424242342423 //********************** Main ****************************************** int main(){ gsl_set_error_handler(&kwantix::errorHandler); try { using namespace std; using namespace kwantix point p(2),q(2); p(1) = P1; p(2) = P2; q(1) = Q1; q(2) = Q2; kwantix::radial_basis_function::set_dimension(2); kwantix::multiquadric phi(p); double out; for(size_t i = 0; i < 10000000; i++){ // out = phi(q); out = sqrt(1 + sqrt(1+ (p(1)-q(1))*(p(1)-q(1)) + (p(2)-q(2))*(p(2)-q(2)) ) ); // out = sqrt(1 // + sqrt(1+ // (P1-Q1)*(P1-Q1) + (P2-Q2)*(P2-Q2) // ) // ); } cout << out << endl; return 0; } catch(kwantix::error exc) { kwantix::show_exception(exc); return 1; } }