X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=check%2Fcheck_lsolve.cpp;h=ba45ad6d9fcbd5237beae0f47aacc842365883aa;hp=59264d9d1cb4cf23b173d438a72db6dca27529d5;hb=116aa059418afd8f6a36ffa9084ebcd858a5ab0f;hpb=bbe1866cef6b794266cd4917a54fb2c02a9931b4 diff --git a/check/check_lsolve.cpp b/check/check_lsolve.cpp index 59264d9d..ba45ad6d 100644 --- a/check/check_lsolve.cpp +++ b/check/check_lsolve.cpp @@ -1,10 +1,11 @@ /** @file check_lsolve.cpp * * These test routines do some simple checks on solving linear systems of - * symbolic equations. */ + * symbolic equations. They are a well-tried resource for cross-checking + * the underlying symbolic manipulations. */ /* - * GiNaC Copyright (C) 1999-2001 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2011 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 @@ -18,16 +19,19 @@ * * 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 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "checks.h" +#include "ginac.h" +using namespace GiNaC; -#if defined(HAVE_SSTREAM) -# include -#else -# include -#endif +#include // for rand() +#include +#include +using namespace std; + +extern const ex +dense_univariate_poly(const symbol & x, unsigned degree); static unsigned check_matrix_solve(unsigned m, unsigned n, unsigned p, unsigned degree) @@ -55,15 +59,9 @@ static unsigned check_matrix_solve(unsigned m, unsigned n, unsigned p, matrix X(n,p); for (unsigned i=0; i a; vector x; for (unsigned i=0; i