X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=check%2Ftime_vandermonde.cpp;h=313acc65f4f3de53185af287c21d19764d3f1b0e;hp=ce0b286d3d5746c2894dd5aa7ecabf57aa6070df;hb=38129d5d3880156f6f217f94855553bf4549a960;hpb=67467d256b44f5e08498ca81c946d9ffaa25d1e2 diff --git a/check/time_vandermonde.cpp b/check/time_vandermonde.cpp index ce0b286d..313acc65 100644 --- a/check/time_vandermonde.cpp +++ b/check/time_vandermonde.cpp @@ -7,7 +7,7 @@ */ /* - * GiNaC Copyright (C) 1999-2008 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2021 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();