* 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
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "ginac.h"
+#include "timer.h"
+using namespace GiNaC;
+
#include <iostream>
#include <sstream>
#include <vector>
-#include "ginac.h"
-#include "timer.h"
using namespace std;
-using namespace GiNaC;
static unsigned expand_subs(unsigned size)
{
cout << "timing commutative expansion and substitution" << flush;
- vector<unsigned> sizes;
+ vector<unsigned> sizes = {100, 200, 400, 800};
vector<double> times;
timer breitling;
- sizes.push_back(100);
- sizes.push_back(200);
- sizes.push_back(400);
- sizes.push_back(800);
-
for (vector<unsigned>::iterator i=sizes.begin(); i!=sizes.end(); ++i) {
breitling.start();
result += expand_subs(*i);