X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=check%2Ftime_vandermonde.cpp;h=f950a36846fe35c65949f5d40dcd1aa3a430ec73;hp=ce0b286d3d5746c2894dd5aa7ecabf57aa6070df;hb=d4ea19a525805e98ddbc8c88a4bb229763373c04;hpb=7d870583a6bf21a2ffb7b6f051b702064623892e diff --git a/check/time_vandermonde.cpp b/check/time_vandermonde.cpp index ce0b286d..f950a368 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-2020 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();