X-Git-Url: https://ginac.de/ginac.git/static/gitweb.css/ginac.git?a=blobdiff_plain;f=check%2Ftime_vandermonde.cpp;h=5fbda47421037548c6244e9ac0f3fa4b5c35781a;hb=63f3e977f92d51ea173382a9b7c4c3b18bda7b8e;hp=1caaa407448097dec43930eb3240dcb41f0321c9;hpb=c3c748381bda4f81b68e50db2eed440c19f24b85;p=ginac.git diff --git a/check/time_vandermonde.cpp b/check/time_vandermonde.cpp index 1caaa407..5fbda474 100644 --- a/check/time_vandermonde.cpp +++ b/check/time_vandermonde.cpp @@ -7,7 +7,7 @@ */ /* - * GiNaC Copyright (C) 1999-2007 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2018 Johannes Gutenberg University Mainz, Germany * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -24,13 +24,14 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include -#include #include "ginac.h" #include "timer.h" -using namespace std; using namespace GiNaC; +#include +#include +using namespace std; + static unsigned vandermonde_det(unsigned size) { unsigned result = 0; @@ -57,7 +58,7 @@ static unsigned vandermonde_det(unsigned size) vanddet *= M(i,1) - M(j,1); if (expand(det - vanddet) != 0) { - clog << "Determaint of Vandermonde matrix " << endl + clog << "Determinant of Vandermonde matrix " << endl << "M==" << M << endl << "was miscalculated: det(M)==" << det << endl; ++result; @@ -72,15 +73,10 @@ unsigned time_vandermonde() cout << "timing determinant of univariate symbolic Vandermonde matrices" << flush; - vector sizes; + vector sizes = {8, 10, 12, 14}; vector times; timer swatch; - sizes.push_back(8); - sizes.push_back(10); - sizes.push_back(12); - sizes.push_back(14); - for (vector::iterator i=sizes.begin(); i!=sizes.end(); ++i) { int count = 1; swatch.start();