]> www.ginac.de Git - ginac.git/commitdiff
* some longish timings are now disabled by default.
authorRichard Kreckel <Richard.Kreckel@uni-mainz.de>
Wed, 28 Feb 2001 15:53:26 +0000 (15:53 +0000)
committerRichard Kreckel <Richard.Kreckel@uni-mainz.de>
Wed, 28 Feb 2001 15:53:26 +0000 (15:53 +0000)
* check/time_lw_M2.cpp: new timing (defaults to disabled)
* check/time_lw_N.cpp: new timing (defaults to disabled)

16 files changed:
check/Makefile.am
check/check_numeric.cpp
check/checks.h
check/exam_noncommut.cpp
check/exams.h
check/genex.cpp
check/time_dennyfliegner.cpp
check/time_lw_G.cpp
check/time_lw_M2.cpp [new file with mode: 0644]
check/time_lw_N.cpp [new file with mode: 0644]
check/time_lw_O.cpp
check/time_lw_Q.cpp
check/time_lw_Qprime.cpp
check/times.cpp
check/times.h
check/times.ref

index 301fb269fbdf234d739553327b1b6c4234a300ff..7932f1c63bce3927ae8f2e06ef9a01912fbf8657 100644 (file)
@@ -12,9 +12,9 @@ checks_LDADD = ../ginac/libginac.la
 times_SOURCES = time_dennyfliegner.cpp time_gammaseries.cpp \
   time_vandermonde.cpp time_toeplitz.cpp time_lw_A.cpp time_lw_B.cpp \
   time_lw_C.cpp time_lw_D.cpp time_lw_E.cpp time_lw_F.cpp time_lw_G.cpp \
 times_SOURCES = time_dennyfliegner.cpp time_gammaseries.cpp \
   time_vandermonde.cpp time_toeplitz.cpp time_lw_A.cpp time_lw_B.cpp \
   time_lw_C.cpp time_lw_D.cpp time_lw_E.cpp time_lw_F.cpp time_lw_G.cpp \
-  time_lw_H.cpp time_lw_IJKL.cpp time_lw_M1.cpp time_lw_O.cpp time_lw_P.cpp \
-  time_lw_Pprime.cpp time_lw_Q.cpp time_lw_Qprime.cpp \
-  timer.cpp times.cpp times.h
+  time_lw_H.cpp time_lw_IJKL.cpp time_lw_M1.cpp time_lw_M2.cpp time_lw_N.cpp \
+  time_lw_O.cpp time_lw_P.cpp time_lw_Pprime.cpp time_lw_Q.cpp \
+  time_lw_Qprime.cpp timer.cpp times.cpp times.h
 times_LDADD = ../ginac/libginac.la
 INCLUDES = -I$(srcdir)/../ginac -I../ginac
 CLEANFILES = exams.out checks.out times.out
 times_LDADD = ../ginac/libginac.la
 INCLUDES = -I$(srcdir)/../ginac -I../ginac
 CLEANFILES = exams.out checks.out times.out
index 85417eb8489386c58272210690886fd88884cbf0..46b78d32d04510fa45001c7fbab5caef87d37f77 100644 (file)
 
 #include "checks.h"
 
 
 #include "checks.h"
 
-#ifndef NO_NAMESPACE_GINAC
-using namespace GiNaC;
-#endif // ndef NO_NAMESPACE_GINAC
-
 /* Simple and maybe somewhat pointless consistency tests of assorted tests and
  * conversions. */
 static unsigned check_numeric1(void)
 /* Simple and maybe somewhat pointless consistency tests of assorted tests and
  * conversions. */
 static unsigned check_numeric1(void)
index b5a6adf8a655a6794e4b8dda7a4c772d2733f6e6..2beca6d3718d71f0ffd9488379d410c3bf84fd2d 100644 (file)
 
 #include "ginac.h"
 using namespace std;
 
 #include "ginac.h"
 using namespace std;
-
-#ifndef NO_NAMESPACE_GINAC
 using namespace GiNaC;
 using namespace GiNaC;
-#endif // ndef NO_NAMESPACE_GINAC
 
 // prototypes for the expression generating functions in:
 const ex dense_univariate_poly(const symbol & x, unsigned degree);
 
 // prototypes for the expression generating functions in:
 const ex dense_univariate_poly(const symbol & x, unsigned degree);
index 03ae6ff980763f96a2ebef01dcd28108cc98cdbf..a6137aa0641557b90ff7a064b828e9510b0c16b3 100644 (file)
@@ -22,8 +22,6 @@
 
 #include "exams.h"
 
 
 #include "exams.h"
 
-#if 0 // this will change
-
 static unsigned lortensor_check1(void)
 {
        // checks simple identities of the metric tensor!
 static unsigned lortensor_check1(void)
 {
        // checks simple identities of the metric tensor!
@@ -47,10 +45,11 @@ static unsigned lortensor_check1(void)
                     << e6 << " instead of 0" << endl;
                ++result;
        }
                     << e6 << " instead of 0" << endl;
                ++result;
        }
-
+       
        return result;
 }
 
        return result;
 }
 
+#if 0  // this will change
 static unsigned lortensor_check2(void)
 {
        // checks simple contraction properties of an arbitrary (symmetric!) rankn lortensor!
 static unsigned lortensor_check2(void)
 {
        // checks simple contraction properties of an arbitrary (symmetric!) rankn lortensor!
@@ -83,10 +82,9 @@ static unsigned lortensor_check2(void)
                     << e10 << " instead of 0" << endl;
                ++result;
        }
                     << e10 << " instead of 0" << endl;
                ++result;
        }
-
+       
        return result;
 }
        return result;
 }
-
 #endif
 
 unsigned exam_noncommut(void)
 #endif
 
 unsigned exam_noncommut(void)
@@ -95,12 +93,11 @@ unsigned exam_noncommut(void)
        
        cout << "examining behaviour of noncommutative objects" << flush;
        clog << "----------behaviour of noncommutative objects:" << endl;
        
        cout << "examining behaviour of noncommutative objects" << flush;
        clog << "----------behaviour of noncommutative objects:" << endl;
-
-#if 0  
+       
        result += lortensor_check1();  cout << '.' << flush;
        result += lortensor_check1();  cout << '.' << flush;
+#if 0
        result += lortensor_check2();  cout << '.' << flush;
 #endif
        result += lortensor_check2();  cout << '.' << flush;
 #endif
-       
        if (!result) {
                cout << " passed " << endl;
                clog << "(no output)" << endl;
        if (!result) {
                cout << " passed " << endl;
                clog << "(no output)" << endl;
index a3d8c196158507c40cd8d58d3c45cec9478dbed1..259b54d2f5a3032ef4ff628585720e5d34b1b161 100644 (file)
 
 #include "ginac.h"
 using namespace std;
 
 #include "ginac.h"
 using namespace std;
-
-#ifndef NO_NAMESPACE_GINAC
 using namespace GiNaC;
 using namespace GiNaC;
-#endif // ndef NO_NAMESPACE_GINAC
 
 // prototypes for all individual checks should be unsigned fcn():
 unsigned exam_paranoia();
 
 // prototypes for all individual checks should be unsigned fcn():
 unsigned exam_paranoia();
index 2a5529132a6391d10f0ba298882d0ebdd87c007f..f4bffb151a484d5b87129833a9dd634e7f253db5 100644 (file)
 #include <stdlib.h>
 
 #include "ginac.h"
 #include <stdlib.h>
 
 #include "ginac.h"
-
-#ifndef NO_NAMESPACE_GINAC
 using namespace GiNaC;
 using namespace GiNaC;
-#endif // ndef NO_NAMESPACE_GINAC
 
 /* Create a dense univariate random polynomial in x.
  * (of the form 9 - 22*a - 17*a^2 + 14*a^3 + 7*a^4 + 7a^5 if degree==5) */
 
 /* Create a dense univariate random polynomial in x.
  * (of the form 9 - 22*a - 17*a^2 + 14*a^3 + 7*a^4 + 7a^5 if degree==5) */
index d81ba91930551ecde72eb3931c5d2ab220adfd00..4f6b7dc35e522918494266a79eb73b183fae9c83 100644 (file)
@@ -38,7 +38,7 @@ static unsigned expand_subs(unsigned size)
                buf << "a" << i << ends;
                a.push_back(symbol(buf.str()));
 #else
                buf << "a" << i << ends;
                a.push_back(symbol(buf.str()));
 #else
-               char buf[4];
+               char buf[5];  // 'a' + 3 decimal digits + '\n'
                ostrstream(buf,sizeof(buf)) << "a" << i << ends;
                a.push_back(symbol(buf));
 #endif
                ostrstream(buf,sizeof(buf)) << "a" << i << ends;
                a.push_back(symbol(buf));
 #endif
index 2eb20380f0a505782b35bfdc2efb9cb7ca7047cf..f7f0273d6b0b79baf067b8998b97afcd6432dd91 100644 (file)
@@ -28,7 +28,7 @@ static unsigned test(void)
        symbol x("x");
        symbol y("y");
        symbol z("z");
        symbol x("x");
        symbol y("y");
        symbol z("z");
-
+       
        ex p = expand(pow(7*y*pow(x*z,2)-3*x*y*z+11*(x+1)*pow(y,2)+5*z+1,4)
                      *pow(3*x-7*y+2*z-3,5));
        ex q = expand(pow(7*y*pow(x*z,2)-3*x*y*z+11*(x+1)*pow(y,2)+5*z+1,3)
        ex p = expand(pow(7*y*pow(x*z,2)-3*x*y*z+11*(x+1)*pow(y,2)+5*z+1,4)
                      *pow(3*x-7*y+2*z-3,5));
        ex q = expand(pow(7*y*pow(x*z,2)-3*x*y*z+11*(x+1)*pow(y,2)+5*z+1,3)
diff --git a/check/time_lw_M2.cpp b/check/time_lw_M2.cpp
new file mode 100644 (file)
index 0000000..fcd587f
--- /dev/null
@@ -0,0 +1,184 @@
+/** @file time_lw_M2.cpp
+ *
+ *  Test M2 from the paper "Comparison of Polynomial-Oriented CAS" by Robert H.
+ *  Lewis and Michael Wester. */
+
+/*
+ *  GiNaC Copyright (C) 1999-2001 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
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include "times.h"
+
+static const bool do_test = false;  // set to true in order to run this beast
+
+static unsigned test(void)
+{
+       // Determinant of a sparse matrix that comes up in graph theory:
+       symbol x1("x1"), x2("x2"), x3("x3"), x4("x4"), x5("x5");
+       symbol x6("x6"), x7("x7"), x8("x8"), x9("x9"), xA("xA");
+       static ex w[101][21] = {
+           { 1, 1, 1, 12, x9, 22, x8, 32, x7, 42, x6, 52, x5, 62, x4, 72, x3, 82, x2, 92, x1 },
+           { 2, 2, 1, 13, x9, 23, x8, 33, x7, 43, x6, 53, x5, 63, x4, 73, x3, 83, x2, 93, x1 },
+           { 3, 3, 1, 14, x9, 24, x8, 34, x7, 44, x6, 54, x5, 64, x4, 74, x3, 84, x2, 94, x1 },
+           { 4, 4, 1, 15, x9, 25, x8, 35, x7, 45, x6, 55, x5, 65, x4, 75, x3, 85, x2, 95, x1 },
+           { 5, 5, 1, 16, x9, 26, x8, 36, x7, 46, x6, 56, x5, 66, x4, 76, x3, 86, x2, 96, x1 },
+           { 6, 6, 1, 17, x9, 27, x8, 37, x7, 47, x6, 57, x5, 67, x4, 77, x3, 87, x2, 97, x1 },
+           { 7, 7, 1, 18, x9, 28, x8, 38, x7, 48, x6, 58, x5, 68, x4, 78, x3, 88, x2, 98, x1 },
+           { 8, 8, 1, 19, x9, 29, x8, 39, x7, 49, x6, 59, x5, 69, x4, 79, x3, 89, x2, 99, x1 },
+           { 9, 9, 1, 20, x9, 30, x8, 40, x7, 50, x6, 60, x5, 70, x4, 80, x3, 90, x2, 100, x1 },
+           {10, 10, 1, 101, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 },
+           {11, 2, xA, 11, 1, 22, x8, 32, x7, 42, x6, 52, x5, 62, x4, 72, x3, 82, x2, 92, x1 },
+           {12, 3, xA, 12, 1, 23, x8, 33, x7, 43, x6, 53, x5, 63, x4, 73, x3, 83, x2, 93, x1 },
+           {13, 4, xA, 13, 1, 24, x8, 34, x7, 44, x6, 54, x5, 64, x4, 74, x3, 84, x2, 94, x1 },
+           {14, 5, xA, 14, 1, 25, x8, 35, x7, 45, x6, 55, x5, 65, x4, 75, x3, 85, x2, 95, x1 },
+           {15, 6, xA, 15, 1, 26, x8, 36, x7, 46, x6, 56, x5, 66, x4, 76, x3, 86, x2, 96, x1 },
+           {16, 7, xA, 16, 1, 27, x8, 37, x7, 47, x6, 57, x5, 67, x4, 77, x3, 87, x2, 97, x1 },
+           {17, 8, xA, 17, 1, 28, x8, 38, x7, 48, x6, 58, x5, 68, x4, 78, x3, 88, x2, 98, x1 },
+           {18, 9, xA, 18, 1, 29, x8, 39, x7, 49, x6, 59, x5, 69, x4, 79, x3, 89, x2, 99, x1 },
+           {19, 10, xA, 19, 1, 30, x8, 40, x7, 50, x6, 60, x5, 70, x4, 80, x3, 90, x2, 100, x1 },
+           {20, 20, 1, 101, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 },
+           {21, 2, xA, 12, x9, 21, 1, 32, x7, 42, x6, 52, x5, 62, x4, 72, x3, 82, x2, 92, x1 },
+           {22, 3, xA, 13, x9, 22, 1, 33, x7, 43, x6, 53, x5, 63, x4, 73, x3, 83, x2, 93, x1 },
+           {23, 4, xA, 14, x9, 23, 1, 34, x7, 44, x6, 54, x5, 64, x4, 74, x3, 84, x2, 94, x1 },
+           {24, 5, xA, 15, x9, 24, 1, 35, x7, 45, x6, 55, x5, 65, x4, 75, x3, 85, x2, 95, x1 },
+           {25, 6, xA, 16, x9, 25, 1, 36, x7, 46, x6, 56, x5, 66, x4, 76, x3, 86, x2, 96, x1 },
+           {26, 7, xA, 17, x9, 26, 1, 37, x7, 47, x6, 57, x5, 67, x4, 77, x3, 87, x2, 97, x1 },
+           {27, 8, xA, 18, x9, 27, 1, 38, x7, 48, x6, 58, x5, 68, x4, 78, x3, 88, x2, 98, x1 },
+           {28, 9, xA, 19, x9, 28, 1, 39, x7, 49, x6, 59, x5, 69, x4, 79, x3, 89, x2, 99, x1 },
+           {29, 10, xA, 20, x9, 29, 1, 40, x7, 50, x6, 60, x5, 70, x4, 80, x3, 90, x2, 100, x1 },
+           {30, 30, 1, 101, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 },
+           {31, 2, xA, 12, x9, 22, x8, 31, 1, 42, x6, 52, x5, 62, x4, 72, x3, 82, x2, 92, x1 },
+           {32, 3, xA, 13, x9, 23, x8, 32, 1, 43, x6, 53, x5, 63, x4, 73, x3, 83, x2, 93, x1 },
+           {33, 4, xA, 14, x9, 24, x8, 33, 1, 44, x6, 54, x5, 64, x4, 74, x3, 84, x2, 94, x1 },
+           {34, 5, xA, 15, x9, 25, x8, 34, 1, 45, x6, 55, x5, 65, x4, 75, x3, 85, x2, 95, x1 },
+           {35, 6, xA, 16, x9, 26, x8, 35, 1, 46, x6, 56, x5, 66, x4, 76, x3, 86, x2, 96, x1 },
+           {36, 7, xA, 17, x9, 27, x8, 36, 1, 47, x6, 57, x5, 67, x4, 77, x3, 87, x2, 97, x1 },
+           {37, 8, xA, 18, x9, 28, x8, 37, 1, 48, x6, 58, x5, 68, x4, 78, x3, 88, x2, 98, x1 },
+           {38, 9, xA, 19, x9, 29, x8, 38, 1, 49, x6, 59, x5, 69, x4, 79, x3, 89, x2, 99, x1 },
+           {39, 10, xA, 20, x9, 30, x8, 39, 1, 50, x6, 60, x5, 70, x4, 80, x3, 90, x2, 100, x1 },
+           {40, 40, 1, 101, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 },
+           {41, 2, xA, 12, x9, 22, x8, 32, x7, 41, 1, 52, x5, 62, x4, 72, x3, 82, x2, 92, x1 },
+           {42, 3, xA, 13, x9, 23, x8, 33, x7, 42, 1, 53, x5, 63, x4, 73, x3, 83, x2, 93, x1 },
+           {43, 4, xA, 14, x9, 24, x8, 34, x7, 43, 1, 54, x5, 64, x4, 74, x3, 84, x2, 94, x1 },
+           {44, 5, xA, 15, x9, 25, x8, 35, x7, 44, 1, 55, x5, 65, x4, 75, x3, 85, x2, 95, x1 },
+           {45, 6, xA, 16, x9, 26, x8, 36, x7, 45, 1, 56, x5, 66, x4, 76, x3, 86, x2, 96, x1 },
+           {46, 7, xA, 17, x9, 27, x8, 37, x7, 46, 1, 57, x5, 67, x4, 77, x3, 87, x2, 97, x1 },
+           {47, 8, xA, 18, x9, 28, x8, 38, x7, 47, 1, 58, x5, 68, x4, 78, x3, 88, x2, 98, x1 },
+           {48, 9, xA, 19, x9, 29, x8, 39, x7, 48, 1, 59, x5, 69, x4, 79, x3, 89, x2, 99, x1 },
+           {49, 10, xA, 20, x9, 30, x8, 40, x7, 49, 1, 60, x5, 70, x4, 80, x3, 90, x2, 100, x1 },
+           {50, 50, 1, 101, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 },
+           {51, 2, xA, 12, x9, 22, x8, 32, x7, 42, x6, 51, 1, 62, x4, 72, x3, 82, x2, 92, x1 },
+           {52, 3, xA, 13, x9, 23, x8, 33, x7, 43, x6, 52, 1, 63, x4, 73, x3, 83, x2, 93, x1 },
+           {53, 4, xA, 14, x9, 24, x8, 34, x7, 44, x6, 53, 1, 64, x4, 74, x3, 84, x2, 94, x1 },
+           {54, 5, xA, 15, x9, 25, x8, 35, x7, 45, x6, 54, 1, 65, x4, 75, x3, 85, x2, 95, x1 },
+           {55, 6, xA, 16, x9, 26, x8, 36, x7, 46, x6, 55, 1, 66, x4, 76, x3, 86, x2, 96, x1 },
+           {56, 7, xA, 17, x9, 27, x8, 37, x7, 47, x6, 56, 1, 67, x4, 77, x3, 87, x2, 97, x1 },
+           {57, 8, xA, 18, x9, 28, x8, 38, x7, 48, x6, 57, 1, 68, x4, 78, x3, 88, x2, 98, x1 },
+           {58, 9, xA, 19, x9, 29, x8, 39, x7, 49, x6, 58, 1, 69, x4, 79, x3, 89, x2, 99, x1 },
+           {59, 10, xA, 20, x9, 30, x8, 40, x7, 50, x6, 59, 1, 70, x4, 80, x3, 90, x2, 100, x1 },
+           {60, 60, 1, 101, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 },
+           {61, 2, xA, 12, x9, 22, x8, 32, x7, 42, x6, 52, x5, 61, 1, 72, x3, 82, x2, 92, x1 },
+           {62, 3, xA, 13, x9, 23, x8, 33, x7, 43, x6, 53, x5, 62, 1, 73, x3, 83, x2, 93, x1 },
+           {63, 4, xA, 14, x9, 24, x8, 34, x7, 44, x6, 54, x5, 63, 1, 74, x3, 84, x2, 94, x1 },
+           {64, 5, xA, 15, x9, 25, x8, 35, x7, 45, x6, 55, x5, 64, 1, 75, x3, 85, x2, 95, x1 },
+           {65, 6, xA, 16, x9, 26, x8, 36, x7, 46, x6, 56, x5, 65, 1, 76, x3, 86, x2, 96, x1 },
+           {66, 7, xA, 17, x9, 27, x8, 37, x7, 47, x6, 57, x5, 66, 1, 77, x3, 87, x2, 97, x1 },
+           {67, 8, xA, 18, x9, 28, x8, 38, x7, 48, x6, 58, x5, 67, 1, 78, x3, 88, x2, 98, x1 },
+           {68, 9, xA, 19, x9, 29, x8, 39, x7, 49, x6, 59, x5, 68, 1, 79, x3, 89, x2, 99, x1 },
+           {69, 10, xA, 20, x9, 30, x8, 40, x7, 50, x6, 60, x5, 69, 1, 80, x3, 90, x2, 100, x1 },
+           {70, 70, 1, 101, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 },
+           {71, 2, xA, 12, x9, 22, x8, 32, x7, 42, x6, 52, x5, 62, x4, 71, 1, 82, x2, 92, x1 },
+           {72, 3, xA, 13, x9, 23, x8, 33, x7, 43, x6, 53, x5, 63, x4, 72, 1, 83, x2, 93, x1 },
+           {73, 4, xA, 14, x9, 24, x8, 34, x7, 44, x6, 54, x5, 64, x4, 73, 1, 84, x2, 94, x1 },
+           {74, 5, xA, 15, x9, 25, x8, 35, x7, 45, x6, 55, x5, 65, x4, 74, 1, 85, x2, 95, x1 },
+           {75, 6, xA, 16, x9, 26, x8, 36, x7, 46, x6, 56, x5, 66, x4, 75, 1, 86, x2, 96, x1 },
+           {76, 7, xA, 17, x9, 27, x8, 37, x7, 47, x6, 57, x5, 67, x4, 76, 1, 87, x2, 97, x1 },
+           {77, 8, xA, 18, x9, 28, x8, 38, x7, 48, x6, 58, x5, 68, x4, 77, 1, 88, x2, 98, x1 },
+           {78, 9, xA, 19, x9, 29, x8, 39, x7, 49, x6, 59, x5, 69, x4, 78, 1, 89, x2, 99, x1 },
+           {79, 10, xA, 20, x9, 30, x8, 40, x7, 50, x6, 60, x5, 70, x4, 79, 1, 90, x2, 100, x1 },
+           {80, 80, 1, 101, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 },
+           {81, 2, xA, 12, x9, 22, x8, 32, x7, 42, x6, 52, x5, 62, x4, 72, x3, 81, 1, 92, x1 },
+           {82, 3, xA, 13, x9, 23, x8, 33, x7, 43, x6, 53, x5, 63, x4, 73, x3, 82, 1, 93, x1 },
+           {83, 4, xA, 14, x9, 24, x8, 34, x7, 44, x6, 54, x5, 64, x4, 74, x3, 83, 1, 94, x1 },
+           {84, 5, xA, 15, x9, 25, x8, 35, x7, 45, x6, 55, x5, 65, x4, 75, x3, 84, 1, 95, x1 },
+           {85, 6, xA, 16, x9, 26, x8, 36, x7, 46, x6, 56, x5, 66, x4, 76, x3, 85, 1, 96, x1 },
+           {86, 7, xA, 17, x9, 27, x8, 37, x7, 47, x6, 57, x5, 67, x4, 77, x3, 86, 1, 97, x1 },
+           {87, 8, xA, 18, x9, 28, x8, 38, x7, 48, x6, 58, x5, 68, x4, 78, x3, 87, 1, 98, x1 },
+           {88, 9, xA, 19, x9, 29, x8, 39, x7, 49, x6, 59, x5, 69, x4, 79, x3, 88, 1, 99, x1 },
+           {89, 10, xA, 20, x9, 30, x8, 40, x7, 50, x6, 60, x5, 70, x4, 80, x3, 89, 1, 100, x1 },
+           {90, 90, 1, 101, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 },
+           {91, 2, xA, 12, x9, 22, x8, 32, x7, 42, x6, 52, x5, 62, x4, 72, x3, 82, x2, 91, 1 },
+           {92, 3, xA, 13, x9, 23, x8, 33, x7, 43, x6, 53, x5, 63, x4, 73, x3, 83, x2, 92, 1 },
+           {93, 4, xA, 14, x9, 24, x8, 34, x7, 44, x6, 54, x5, 64, x4, 74, x3, 84, x2, 93, 1 },
+           {94, 5, xA, 15, x9, 25, x8, 35, x7, 45, x6, 55, x5, 65, x4, 75, x3, 85, x2, 94, 1 },
+           {95, 6, xA, 16, x9, 26, x8, 36, x7, 46, x6, 56, x5, 66, x4, 76, x3, 86, x2, 95, 1 },
+           {96, 7, xA, 17, x9, 27, x8, 37, x7, 47, x6, 57, x5, 67, x4, 77, x3, 87, x2, 96, 1 },
+           {97, 8, xA, 18, x9, 28, x8, 38, x7, 48, x6, 58, x5, 68, x4, 78, x3, 88, x2, 97, 1 },
+           {98, 9, xA, 19, x9, 29, x8, 39, x7, 49, x6, 59, x5, 69, x4, 79, x3, 89, x2, 98, 1 },
+           {99, 10, xA, 20, x9, 30, x8, 40, x7, 50, x6, 60, x5, 70, x4, 80, x3, 90, x2, 99, 1 },
+           {100, 100, 1, 101, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 },
+           {101, 1, xA, 11, x9, 21, x8, 31, x7, 41, x6, 51, x5, 61, x4, 71, x3, 81, x2, 91, x1}
+       };
+       matrix m(101,101);
+       for (unsigned r=0; r<101; ++r) {
+               for (unsigned c=0; c<10; ++c) {
+                       m.set(r,
+                             unsigned(ex_to_numeric(w[r][2*c+1]).to_int()-1),
+                             w[r][2*c+2]);
+               }
+       }
+       ex det = m.determinant();
+       if (det.nops()!=85228) {
+               clog << "The determinant was miscalculated." << endl;
+               return 1;
+       }
+       return 0;
+}
+
+unsigned time_lw_M2(void)
+{
+       unsigned result = 0;
+       unsigned count = 0;
+       timer piaget;
+       double time = .0;
+       
+       cout << "timing Lewis-Wester test M2 (101x101 sparse, det)" << flush;
+       clog << "-------Lewis-Wester test M2 (101x101 sparse, det)" << endl;
+       
+       if (do_test) {
+               piaget.start();
+               // correct for very small times:
+               do {
+                       result = test();
+                       ++count;
+               } while ((time=piaget.read())<0.1 && !result);
+               cout << '.' << flush;
+               
+               if (!result) {
+                       cout << " passed ";
+                       clog << "(no output)" << endl;
+               } else {
+                       cout << " failed ";
+               }
+               cout << int(1000*(time/count))*0.001 << 's' << endl;
+       } else {
+               cout << " disabled" << endl;
+               clog << "(no output)" << endl;
+       }
+       
+       return result;
+}
diff --git a/check/time_lw_N.cpp b/check/time_lw_N.cpp
new file mode 100644 (file)
index 0000000..8b7d889
--- /dev/null
@@ -0,0 +1,87 @@
+/** @file time_lw_N.cpp
+ *
+ *  Test N from the paper "Comparison of Polynomial-Oriented CAS" by Robert H.
+ *  Lewis and Michael Wester (also known as the smaller version of the first
+ *  Fermat-test). */
+
+/*
+ *  GiNaC Copyright (C) 1999-2001 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
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include "times.h"
+
+static const bool do_test = false;  // set to true in order to run this beast
+
+static unsigned test(void)
+{
+       symbol p11("p11"), p12("p12"), p21("p21"), p22("p22");
+       symbol a12("a12"), a21("a21"), a22("a22");
+       symbol n11("n11"), n22("n22");
+       symbol g("g");
+       symbol q1("q1"), q2("q2"), q3("q3"), q4("q4");
+       
+       ex ss1 = ex("(4*g*a22^3-g*a12*a21*a22^2-4*n22*a21*a22^2+4*n11*a21*a22^2+7*g*a12*a22^2+4*g^2*a22^2-4*n11*n22*a22^2+4*n11*a22^2+n22*a12*a21^2*a22-n11*a12*a21^2*a22-4*g*a21^2*a22-g*a12^2*a21*a22-5*g^2*a12*a21*a22+5*n11*n22*a12*a21*a22-7*n22*a12*a21*a22+2*n11*a12*a21*a22-4*g*a21*a22+3*g*a12^2*a22+3*g^2*a12*a22-3*n11*n22*a12*a22+3*n11*a12*a22+g*a12*a21^3+g^2*a12^2*a21^2-n11*n22*a12^2*a21^2+n22*a12^2*a21^2-2*g*a12*a21^2-3*g^2*a12^2*a21+3*n11*n22*a12^2*a21-3*n22*a12^2*a21-3*g*a12*a21)/(3*g*a12*a21*a22^2-3*n22*a21*a22^2+g*a12*a22^2-n22*a22^2+3*n11*a12*a21^2*a22-3*g*a21^2*a22+5*g*a12^2*a21*a22-5*n22*a12*a21*a22+4*n11*a12*a21*a22-4*g*a21*a22+g*a12^2*a22-n22*a12*a22+n11*a12*a22-g*a22+2*n11*a12^2*a21^2-2*g*a12*a21^2+2*g*a12^3*a21-2*n22*a12^2*a21+2*n11*a12^2*a21-2*g*a12*a21)",lst(g,a12,a21,a22,n11,n22));
+       
+       ex ss2 = ex("(4*g*a12*a22^2-4*n22*a22^2+4*a22^2-g*a12^2*a21*a22+n22*a12*a21*a22+4*n11*a12*a21*a22-5*a12*a21*a22-4*g*a21*a22+3*g*a12^2*a22-3*n22*a12*a22+3*a12*a22-n11*a12^2*a21^2+a12^2*a21^2+g*a12*a21^2+3*n11*a12^2*a21-3*a12^2*a21-3*g*a12*a21)/(2*g*a12*a22^2-2*n22*a22^2+g*a12^2*a21*a22-n22*a12*a21*a22+2*n11*a12*a21*a22-2*g*a21*a22+2*g*a12^2*a22-2*n22*a12*a22+2*n11*a12*a22-2*g*a22+n11*a12^2*a21^2-g*a12*a21^2+g*a12^3*a21-n22*a12^2*a21+n11*a12^2*a21-g*a12*a21)",lst(g,a12,a21,a22,n11,n22));
+       
+       ex ss3 = ex("(4*p21*a22^3-p21*a12*a21*a22^2-4*p22*a21*a22^2+4*p11*a21*a22^2+7*p21*a12*a22^2-4*p11*p22*a22^2+4*p12*p21*a22^2+4*p11*a22^2+p22*a12*a21^2*a22-p11*a12*a21^2*a22-4*p12*a21^2*a22-p21*a12^2*a21*a22+5*p11*p22*a12*a21*a22-7*p22*a12*a21*a22-5*p12*p21*a12*a21*a22+2*p11*a12*a21*a22-4*p12*a21*a22+3*p21*a12^2*a22-3*p11*p22*a12*a22+3*p12*p21*a12*a22+3*p11*a12*a22+p12*a12*a21^3-p11*p22*a12^2*a21^2+p22*a12^2*a21^2+p12*p21*a12^2*a21^2-2*p12*a12*a21^2+3*p11*p22*a12^2*a21-3*p22*a12^2*a21-3*p12*p21*a12^2*a21-3*p12*a12*a21)/(3*p21*a12*a21*a22^2-3*p22*a21*a22^2+p21*a12*a22^2-p22*a22^2+3*p11*a12*a21^2*a22-3*p12*a21^2*a22+5*p21*a12^2*a21*a22-5*p22*a12*a21*a22+4*p11*a12*a21*a22-4*p12*a21*a22+p21*a12^2*a22-p22*a12*a22+p11*a12*a22-p12*a22+2*p11*a12^2*a21^2-2*p12*a12*a21^2+2*p21*a12^3*a21-2*p22*a12^2*a21+2*p11*a12^2*a21-2*p12*a12*a21)",lst(a12,a21,a22,p11,p12,p21,p22));
+       
+       ex ss4 = ex("(4*p21*a12*a22^2-4*p22*a22^2+4*a22^2-p21*a12^2*a21*a22+p22*a12*a21*a22+4*p11*a12*a21*a22-5*a12*a21*a22-4*p12*a21*a22+3*p21*a12^2*a22-3*p22*a12*a22+3*a12*a22-p11*a12^2*a21^2+a12^2*a21^2+p12*a12*a21^2+3*p11*a12^2*a21-3*a12^2*a21-3*p12*a12*a21)/(2*p21*a12*a22^2-2*p22*a22^2+p21*a12^2*a21*a22-p22*a12*a21*a22+2*p11*a12*a21*a22-2*p12*a21*a22+2*p21*a12^2*a22-2*p22*a12*a22+2*p11*a12*a22-2*p12*a22+p11*a12^2*a21^2-p12*a12*a21^2+p21*a12^3*a21-p22*a12^2*a21+p11*a12^2*a21-p12*a12*a21)",lst(p11,p12,p21,p22,a12,a21,a22));
+       
+       ex res1 = ex("p11*p22*q1^2*q4^2-p12*p21*q1^2*q4^2-n22*p11*p22*q1*q4^2+2*n11*p11*p22*q1*q4^2-p11*p22*q1*q4^2+n22*p12*p21*q1*q4^2-2*n11*p12*p21*q1*q4^2+p12*p21*q1*q4^2+2*g^2*p11*p22*q4^2-2*n11*n22*p11*p22*q4^2+2*n22*p11*p22*q4^2+2*n11*p11*p22*q4^2-2*p11*p22*q4^2-2*g^2*p12*p21*q4^2+2*n11*n22*p12*p21*q4^2-2*n22*p12*p21*q4^2-2*n11*p12*p21*q4^2+2*p12*p21*q4^2-n11*p22*q1*q2*q3*q4+g*p21*q1*q2*q3*q4+g*p12*q1*q2*q3*q4-n22*p11*q1*q2*q3*q4-g^2*p22*q2*q3*q4+n11*n22*p22*q2*q3*q4-n11*p22*q2*q3*q4-2*g*p21*q2*q3*q4+g*p12*q2*q3*q4+2*g^2*p11*q2*q3*q4-2*n11*n22*p11*q2*q3*q4+2*n22*p11*q2*q3*q4-n11*p22*q1*q3*q4+p22*q1*q3*q4+g*p21*q1*q3*q4-2*g*p12*q1*q3*q4+2*n22*p11*q1*q3*q4-2*p11*q1*q3*q4-g^2*p22*q3*q4+n11*n22*p22*q3*q4-n22*p22*q3*q4-n11*p22*q3*q4+p22*q3*q4-4*g^2*p11*q3*q4+4*n11*n22*p11*q3*q4-4*n22*p11*q3*q4-4*n11*p11*q3*q4+4*p11*q3*q4+n22*p11*p22*q1*q2*q4-2*n11*p11*p22*q1*q2*q4+2*n11*p22*q1*q2*q4-n22*p12*p21*q1*q2*q4+2*n11*p12*p21*q1*q2*q4+g*p21*q1*q2*q4-2*g*p12*q1*q2*q4-n22*p11*q1*q2*q4-4*g^2*p11*p22*q2*q4+4*n11*n22*p11*p22*q2*q4-2*n22*p11*p22*q2*q4-2*n11*p11*p22*q2*q4+2*g^2*p22*q2*q4-2*n11*n22*p22*q2*q4+2*n11*p22*q2*q4+4*g^2*p12*p21*q2*q4-4*n11*n22*p12*p21*q2*q4+2*n22*p12*p21*q2*q4+2*n11*p12*p21*q2*q4-2*g*p21*q2*q4-2*g*p12*q2*q4+2*g^2*p11*q2*q4-2*n11*n22*p11*q2*q4+2*n22*p11*q2*q4-p11*p22*q1^2*q4-p22*q1^2*q4+p12*p21*q1^2*q4+2*p11*q1^2*q4-n22*p11*p22*q1*q4-4*n11*p11*p22*q1*q4+5*p11*p22*q1*q4+n22*p22*q1*q4-p22*q1*q4+n22*p12*p21*q1*q4+4*n11*p12*p21*q1*q4-5*p12*p21*q1*q4+g*p21*q1*q4+4*g*p12*q1*q4+4*n11*p11*q1*q4-4*p11*q1*q4-g^2*q2^2*q3^2+n11*n22*q2^2*q3^2+g^2*q2*q3^2-n11*n22*q2*q3^2-n22*q2*q3^2+2*n11*q2*q3^2+2*g^2*q3^2-2*n11*n22*q3^2+2*n22*q3^2+2*n11*q3^2-2*q3^2+g^2*p22*q2^2*q3-n11*n22*p22*q2^2*q3-2*g^2*p11*q2^2*q3+2*n11*n22*p11*q2^2*q3+g^2*q2^2*q3-n11*n22*q2^2*q3+2*n11*p22*q1*q2*q3-2*g*p21*q1*q2*q3+g*p12*q1*q2*q3-n22*p11*q1*q2*q3+n22*q1*q2*q3-2*n11*q1*q2*q3+g^2*p22*q2*q3-n11*n22*p22*q2*q3+n22*p22*q2*q3+4*g*p21*q2*q3+g*p12*q2*q3+4*g^2*p11*q2*q3-4*n11*n22*p11*q2*q3+4*n11*p11*q2*q3-5*g^2*q2*q3+5*n11*n22*q2*q3-n22*q2*q3-4*n11*q2*q3+2*n11*p22*q1*q3-2*p22*q1*q3-2*g*p21*q1*q3-2*g*p12*q1*q3+2*n22*p11*q1*q3-2*p11*q1*q3-2*n22*q1*q3-2*n11*q1*q3+4*q1*q3+2*g^2*p11*p22*q2^2-2*n11*n22*p11*p22*q2^2-2*g^2*p22*q2^2+2*n11*n22*p22*q2^2-2*g^2*p12*p21*q2^2+2*n11*n22*p12*p21*q2^2-2*g^2*p11*q2^2+2*n11*n22*p11*q2^2+2*g^2*q2^2-2*n11*n22*q2^2+n22*p11*p22*q1*q2+4*n11*p11*p22*q1*q2-n22*p22*q1*q2-4*n11*p22*q1*q2-n22*p12*p21*q1*q2-4*n11*p12*p21*q1*q2-n22*p11*q1*q2-4*n11*p11*q1*q2+n22*q1*q2+4*n11*q1*q2-2*p11*p22*q1^2+2*p22*q1^2+2*p12*p21*q1^2+2*p11*q1^2-2*q1^2",lst(p11,p12,p21,p22,n11,n22,g,q1,q2,q3,q4));
+       ex result = res1.subs(lst(q1==ss1, q2==ss2, q3==ss3, q4==ss4));
+       ex normalresult = normal(result);
+       if (!normalresult.is_zero()) {
+               clog << "Normalization should have returned 0." << endl;
+               return 1;
+       }
+       return 0;
+}
+
+unsigned time_lw_N(void)
+{
+       unsigned result = 0;
+       unsigned count = 0;
+       timer tag_heuer;
+       double time = .0;
+       
+       cout << "timing Lewis-Wester test N (poly at rational fcns)" << flush;
+       clog << "-------Lewis-Wester test N (poly at rational fcns)" << endl;
+       
+       if (do_test) {
+               tag_heuer.start();
+               // correct for very small times:
+               do {
+                       result = test();
+                       ++count;
+               } while ((time=tag_heuer.read())<0.1 && !result);
+               cout << '.' << flush;
+               
+               if (!result) {
+                       cout << " passed ";
+                       clog << "(no output)" << endl;
+               } else {
+                       cout << " failed ";
+               }
+               cout << int(1000*(time/count))*0.001 << 's' << endl;
+       } else {
+               cout << " disabled" << endl;
+               clog << "(no output)" << endl;
+       }
+       
+       return result;
+}
index d36771048fe943c0fe844c30b1c58d8e27068827..fd2667cc43c85dd97860bc38ca88fc0a12597456 100644 (file)
@@ -23,6 +23,8 @@
 
 #include "times.h"
 
 
 #include "times.h"
 
+static const bool do_test = false;  // set to true in order to run this beast
+
 static unsigned test1(void)
 {
        symbol a1("a1"), a2("a2"), a3("a3"), a4("a4"), a5("a5"), a6("a6");
 static unsigned test1(void)
 {
        symbol a1("a1"), a2("a2"), a3("a3"), a4("a4"), a5("a5"), a6("a6");
@@ -108,20 +110,25 @@ unsigned time_lw_O(void)
        cout << "timing Lewis-Wester test O1 (three 15x15 dets)" << flush;
        clog << "-------Lewis-Wester test O1 (three 15x15 dets)" << endl;
        
        cout << "timing Lewis-Wester test O1 (three 15x15 dets)" << flush;
        clog << "-------Lewis-Wester test O1 (three 15x15 dets)" << endl;
        
-       rolex.start();
-       // correct for very small times:
-       do {
-               result = test1();
-               ++count;
-       } while ((time=rolex.read())<0.1 && !result);
-       
-       if (!result) {
-               cout << " passed ";
-               clog << "(no output)" << endl;
+       if (do_test) {
+               rolex.start();
+               // correct for very small times:
+               do {
+                       result = test1();
+                       ++count;
+               } while ((time=rolex.read())<0.1 && !result);
+               
+               if (!result) {
+                       cout << " passed ";
+                       clog << "(no output)" << endl;
+               } else {
+                       cout << " failed ";
+               }
+               cout << int(1000*(time/(3*count)))*0.001 << "s (average)" << endl;
        } else {
        } else {
-               cout << " failed ";
+               cout << " disabled" << endl;
+               clog << "(no output)" << endl;
        }
        }
-       cout << int(1000*(time/(3*count)))*0.001 << "s (average)" << endl;
        
        return result;
 }
        
        return result;
 }
index 01ce6ecd72a85c653cec431b2225c5cda4685979..cc63946a7b28848fc1a358ce73fca416955130cd 100644 (file)
@@ -23,6 +23,8 @@
 
 #include "times.h"
 
 
 #include "times.h"
 
+static const bool do_test = false;  // set to true in order to run this beast
+
 static unsigned test(void)
 {
        // same matrix as in test P:
 static unsigned test(void)
 {
        // same matrix as in test P:
@@ -62,21 +64,26 @@ unsigned time_lw_Q(void)
        cout << "timing Lewis-Wester test Q (charpoly(P))" << flush;
        clog << "-------Lewis-Wester test Q (charpoly(P))" << endl;
        
        cout << "timing Lewis-Wester test Q (charpoly(P))" << flush;
        clog << "-------Lewis-Wester test Q (charpoly(P))" << endl;
        
-       rolex.start();
-       // correct for very small times:
-       do {
-               result = test();
-               ++count;
-       } while ((time=rolex.read())<0.1 && !result);
-       cout << '.' << flush;
-       
-       if (!result) {
-               cout << " passed ";
-               clog << "(no output)" << endl;
+       if (do_test) {
+               rolex.start();
+               // correct for very small times:
+               do {
+                       result = test();
+                       ++count;
+               } while ((time=rolex.read())<0.1 && !result);
+               cout << '.' << flush;
+               
+               if (!result) {
+                       cout << " passed ";
+                       clog << "(no output)" << endl;
+               } else {
+                       cout << " failed ";
+               }
+               cout << int(1000*(time/count))*0.001 << 's' << endl;
        } else {
        } else {
-               cout << " failed ";
+               cout << " disabled" << endl;
+               clog << "(no output)" << endl;
        }
        }
-       cout << int(1000*(time/count))*0.001 << 's' << endl;
        
        return result;
 }
        
        return result;
 }
index 6bbf6d11026e3124c59fe59d16d96839c7e6ca5b..c1306adcdc169b9d8b5a8939eb082086d58a1df9 100644 (file)
@@ -23,6 +23,8 @@
 
 #include "times.h"
 
 
 #include "times.h"
 
+static const bool do_test = false;  // set to true in order to run this beast
+
 static unsigned test(void)
 {
        // same matrix as in test P':
 static unsigned test(void)
 {
        // same matrix as in test P':
@@ -74,21 +76,26 @@ unsigned time_lw_Qprime(void)
        cout << "timing Lewis-Wester test Q' (charpoly(P'))" << flush;
        clog << "-------Lewis-Wester test Q' (charpoly(P'))" << endl;
        
        cout << "timing Lewis-Wester test Q' (charpoly(P'))" << flush;
        clog << "-------Lewis-Wester test Q' (charpoly(P'))" << endl;
        
-       rolex.start();
-       // correct for very small times:
-       do {
-               result = test();
-               ++count;
-       } while ((time=rolex.read())<0.1 && !result);
-       cout << '.' << flush;
-       
-       if (!result) {
-               cout << " passed ";
-               clog << "(no output)" << endl;
+       if (do_test) {
+               rolex.start();
+               // correct for very small times:
+               do {
+                       result = test();
+                       ++count;
+               } while ((time=rolex.read())<0.1 && !result);
+               cout << '.' << flush;
+               
+               if (!result) {
+                       cout << " passed ";
+                       clog << "(no output)" << endl;
+               } else {
+                       cout << " failed ";
+               }
+               cout << int(1000*(time/count))*0.001 << 's' << endl;
        } else {
        } else {
-               cout << " failed ";
+               cout << " disabled" << endl;
+               clog << "(no output)" << endl;
        }
        }
-       cout << int(1000*(time/count))*0.001 << 's' << endl;
        
        return result;
 }
        
        return result;
 }
index 8f4200b7bcd8c395aec6875654e65141e1d0b7e0..1e7475c768156d4dd0a4f6854e50d699bceca700 100644 (file)
@@ -127,6 +127,20 @@ int main()
                ++result;
        }
        
                ++result;
        }
        
+       try {
+               result += time_lw_M2();
+       } catch (const exception &e) {
+               cout << "Error: caught exception " << e.what() << endl;
+               ++result;
+       }
+       
+       try {
+               result += time_lw_N();
+       } catch (const exception &e) {
+               cout << "Error: caught exception " << e.what() << endl;
+               ++result;
+       }
+       
        try {
                result += time_lw_O();
        } catch (const exception &e) {
        try {
                result += time_lw_O();
        } catch (const exception &e) {
index 7dfe217dbecefef43c9478e934fe66384abf79ce..28ce4a758fb8db5bc0a288b08b99eb403691dfe2 100644 (file)
 
 #include <sys/resource.h>
 #include <stdlib.h>
 
 #include <sys/resource.h>
 #include <stdlib.h>
-#include <strstream>
+#include "config.h"
+#if defined(HAVE_SSTREAM)
+#  include <sstream>
+#else
+#  include <strstream>
+#endif
 #include <vector>
 using namespace std;
 
 #include "ginac.h"
 #include <vector>
 using namespace std;
 
 #include "ginac.h"
-
-#ifndef NO_NAMESPACE_GINAC
 using namespace GiNaC;
 using namespace GiNaC;
-#endif // ndef NO_NAMESPACE_GINAC
 
 class timer {
 public:
 
 class timer {
 public:
@@ -63,6 +65,8 @@ unsigned time_lw_G();
 unsigned time_lw_H();
 unsigned time_lw_IJKL();
 unsigned time_lw_M1();
 unsigned time_lw_H();
 unsigned time_lw_IJKL();
 unsigned time_lw_M1();
+unsigned time_lw_M2();
+unsigned time_lw_N();
 unsigned time_lw_O();
 unsigned time_lw_P();
 unsigned time_lw_Pprime();
 unsigned time_lw_O();
 unsigned time_lw_P();
 unsigned time_lw_Pprime();
index 1e77419b3354895e9b862efced0750f40eb32234..d5196fb224263f63a6b8e68a91d2a6cad9bccb7a 100644 (file)
 (no output)
 -------Lewis-Wester test M1 (26x26 sparse, det)
 (no output)
 (no output)
 -------Lewis-Wester test M1 (26x26 sparse, det)
 (no output)
+-------Lewis-Wester test M2 (101x101 sparse, det)
+(no output)
+-------Lewis-Wester test N (poly at rational fcns)
+(no output)
 -------Lewis-Wester test O1 (three 15x15 dets)
 (no output)
 -------Lewis-Wester test P (det of sparse rank 101)
 -------Lewis-Wester test O1 (three 15x15 dets)
 (no output)
 -------Lewis-Wester test P (det of sparse rank 101)