X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=check%2Ftime_dennyfliegner.cpp;h=15f11bd2a4060d045f68d149a1171e5f351f8c30;hp=07a8938ca2389a54bc3317f59ce58595b5bad9ec;hb=8cffcdf13d817a47f217f1a1043317d95969e070;hpb=83a7ee99a947cbbf331018b803ad6be43a9ccd45 diff --git a/check/time_dennyfliegner.cpp b/check/time_dennyfliegner.cpp index 07a8938c..15f11bd2 100644 --- a/check/time_dennyfliegner.cpp +++ b/check/time_dennyfliegner.cpp @@ -7,7 +7,7 @@ * after which e should be just a1^2. */ /* - * GiNaC Copyright (C) 1999-2008 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2019 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 "ginac.h" +#include "timer.h" +using namespace GiNaC; + #include #include #include -#include "ginac.h" -#include "timer.h" using namespace std; -using namespace GiNaC; static unsigned expand_subs(unsigned size) { @@ -65,15 +66,10 @@ unsigned time_dennyfliegner() cout << "timing commutative expansion and substitution" << flush; - vector sizes; + vector sizes = {100, 200, 400, 800}; vector times; timer breitling; - sizes.push_back(100); - sizes.push_back(200); - sizes.push_back(400); - sizes.push_back(800); - for (vector::iterator i=sizes.begin(); i!=sizes.end(); ++i) { breitling.start(); result += expand_subs(*i);