X-Git-Url: https://ginac.de/ginac.git//ginac.git?a=blobdiff_plain;f=check%2Fcheck_lsolve.cpp;h=795f157d90126de925d9624ea922b813294b5405;hb=dd19b7316b6eba5c49b6a4fb3503c504ec6c866a;hp=1873bb2d70814fd3feb32c229e3934abc938e1ee;hpb=db5765dc91202851739e196ba11bfccb0b3fe7bc;p=ginac.git diff --git a/check/check_lsolve.cpp b/check/check_lsolve.cpp index 1873bb2d..795f157d 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-2000 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2009 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,183 +19,189 @@ * * 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; + +#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) + unsigned degree) { - const symbol a("a"); - matrix A(m,n); - matrix B(m,p); - // set the first min(m,n) rows of A and B - for (unsigned ro=0; (ro x; - matrix X(n,p); - for (unsigned i=0; i x; + matrix X(n,p); + for (unsigned i=0; i a; - vector x; - for (unsigned i=0; i a; + vector x; + for (unsigned i=0; i