From: Richard Kreckel Date: Tue, 28 Mar 2000 00:51:17 +0000 (+0000) Subject: - New tests from the Lewis-Wester Paper: I, J, K and L. X-Git-Tag: release_0-6-0~45 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=8b0c2741cf5b9b17025302f96ee7d1a451bbfbb0 - New tests from the Lewis-Wester Paper: I, J, K and L. --- diff --git a/check/Makefile.am b/check/Makefile.am index 7b24a578..7083c694 100644 --- a/check/Makefile.am +++ b/check/Makefile.am @@ -12,8 +12,8 @@ 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 \ - time_lw_H.cpp time_lw_M1.cpp time_lw_O.cpp time_lw_P.cpp time_lw_Pprime.cpp \ - timer.cpp times.cpp times.h + time_lw_H.cpp time_lw_IJKL.cpp time_lw_M1.cpp time_lw_O.cpp time_lw_P.cpp \ + time_lw_Pprime.cpp timer.cpp times.cpp times.h times_LDADD = ../ginac/libginac.la INCLUDES = -I$(srcdir)/../ginac CLEANFILES = exams.out checks.out times.out diff --git a/check/Makefile.in b/check/Makefile.in index b3f8dd5b..ab8c531a 100644 --- a/check/Makefile.in +++ b/check/Makefile.in @@ -111,7 +111,7 @@ exams_LDADD = ../ginac/libginac.la checks_SOURCES = check_numeric.cpp check_inifcns.cpp check_matrices.cpp check_lsolve.cpp genex.cpp checks.cpp checks.h 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 time_lw_H.cpp time_lw_M1.cpp time_lw_O.cpp time_lw_P.cpp time_lw_Pprime.cpp timer.cpp times.cpp times.h +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 timer.cpp times.cpp times.h times_LDADD = ../ginac/libginac.la INCLUDES = -I$(srcdir)/../ginac @@ -138,7 +138,8 @@ checks_LDFLAGS = times_OBJECTS = time_dennyfliegner.o time_gammaseries.o \ time_vandermonde.o time_toeplitz.o time_lw_A.o time_lw_B.o time_lw_C.o \ time_lw_D.o time_lw_E.o time_lw_F.o time_lw_G.o time_lw_H.o \ -time_lw_M1.o time_lw_O.o time_lw_P.o time_lw_Pprime.o timer.o times.o +time_lw_IJKL.o time_lw_M1.o time_lw_O.o time_lw_P.o time_lw_Pprime.o \ +timer.o times.o times_DEPENDENCIES = ../ginac/libginac.la times_LDFLAGS = CXXFLAGS = @CXXFLAGS@ @@ -167,10 +168,10 @@ DEP_FILES = .deps/check_inifcns.P .deps/check_lsolve.P \ .deps/exams.P .deps/genex.P .deps/time_dennyfliegner.P \ .deps/time_gammaseries.P .deps/time_lw_A.P .deps/time_lw_B.P \ .deps/time_lw_C.P .deps/time_lw_D.P .deps/time_lw_E.P .deps/time_lw_F.P \ -.deps/time_lw_G.P .deps/time_lw_H.P .deps/time_lw_M1.P \ -.deps/time_lw_O.P .deps/time_lw_P.P .deps/time_lw_Pprime.P \ -.deps/time_toeplitz.P .deps/time_vandermonde.P .deps/timer.P \ -.deps/times.P +.deps/time_lw_G.P .deps/time_lw_H.P .deps/time_lw_IJKL.P \ +.deps/time_lw_M1.P .deps/time_lw_O.P .deps/time_lw_P.P \ +.deps/time_lw_Pprime.P .deps/time_toeplitz.P .deps/time_vandermonde.P \ +.deps/timer.P .deps/times.P SOURCES = $(exams_SOURCES) $(checks_SOURCES) $(times_SOURCES) OBJECTS = $(exams_OBJECTS) $(checks_OBJECTS) $(times_OBJECTS) diff --git a/check/time_dennyfliegner.cpp b/check/time_dennyfliegner.cpp index 591e7a4f..0d787853 100644 --- a/check/time_dennyfliegner.cpp +++ b/check/time_dennyfliegner.cpp @@ -62,7 +62,7 @@ unsigned time_dennyfliegner(void) vector sizes; vector times; - timer rolex; + timer breitling; sizes.push_back(25); sizes.push_back(50); @@ -70,9 +70,9 @@ unsigned time_dennyfliegner(void) sizes.push_back(200); for (vector::iterator i=sizes.begin(); i!=sizes.end(); ++i) { - rolex.start(); + breitling.start(); result += expand_subs(*i); - times.push_back(rolex.read()); + times.push_back(breitling.read()); cout << '.' << flush; } diff --git a/check/time_lw_IJKL.cpp b/check/time_lw_IJKL.cpp new file mode 100644 index 00000000..62f69b66 --- /dev/null +++ b/check/time_lw_IJKL.cpp @@ -0,0 +1,92 @@ +/** @file time_lw_IJKL.cpp + * + * Tests I, J, K and L from the paper "Comparison of Polynomial-Oriented CAS" + * by Robert H. Lewis and Michael Wester. */ + +/* + * GiNaC Copyright (C) 1999-2000 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 unsigned test(unsigned n) +{ + unsigned result = 0; + timer cartier; + char name = (n==40?'I':(n==70?'K':'?')); + + cout << "timing Lewis-Wester test " << name + << " (invert rank " << n << " Hilbert)" << flush; + clog << "-------Lewis-Wester test " << name + << " (invert rank " << n << " Hilbert)" << endl; + + // Create a rank n Hilbert matrix: + matrix H(n,n); + for (unsigned r=0; r