]> www.ginac.de Git - ginac.git/blobdiff - check/time_antipode.cpp
Removed trailing spaces.
[ginac.git] / check / time_antipode.cpp
index 67f410c7fa47e29f647815cfdcbc3c87b296d8ac..4f678382dbb77abacb2581d44fd3f3f998536259 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 /*
- *  GiNaC Copyright (C) 1999-2007 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2010 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 "times.h"
-#include <utility>
-#include <vector>
-#include <set>
+#include "ginac.h"
+#include "timer.h"
+using namespace GiNaC;
+
 #include <map>
-#include <typeinfo>
+#include <set>
 #include <stdexcept>
+#include <typeinfo>
+#include <utility>
+#include <vector>
+using namespace std;
 
 // whether to run this beast or not:
 static const bool do_test = true;
@@ -68,6 +72,7 @@ static ex div_part(const ex &exarg, const symbol &x, unsigned grad)
 /* F_ab(a, i, b, j, "x") is a common pattern in all vertex evaluators. */
 static ex F_ab(int a, int i, int b, int j, const symbol &x)
 {
+       using GiNaC::tgamma;
        if ((i==0 && a<=0) || (j==0 && b<=0))
                return 0;
        else
@@ -479,7 +484,6 @@ unsigned time_antipode()
        timer jaeger_le_coultre;
        
        cout << "timing computation of antipodes in Yukawa theory" << flush;
-       clog << "-------computation of antipodes in Yukawa theory:" << endl;
        
        if (do_test) {
                jaeger_le_coultre.start();
@@ -490,17 +494,18 @@ unsigned time_antipode()
                result += test_tree(tree5);  cout << '.' << flush;
                result += test_tree(tree6);  cout << '.' << flush;
                
-               if (!result) {
-                       cout << " passed ";
-                       clog << "(no output)" << endl;
-               } else {
-                       cout << " failed ";
-               }
                cout << jaeger_le_coultre.read() << "s (total)" << endl;
        } else {
                cout << " disabled" << endl;
-               clog << "(no output)" << endl;
        }
-       
        return result;
 }
+
+extern void randomify_symbol_serials();
+
+int main(int argc, char** argv)
+{
+       randomify_symbol_serials();
+       cout << setprecision(2) << showpoint;
+       return time_antipode();
+}