git://www.ginac.de
/
ginac.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* Adjusted Debinization.
[ginac.git]
/
check
/
check_lsolve.cpp
diff --git
a/check/check_lsolve.cpp
b/check/check_lsolve.cpp
index 4a84a13c13b54555fd359ec2b63ed6bd632c94e4..a964c4b305352012393dad56dbe6b9bead9e752b 100644
(file)
--- a/
check/check_lsolve.cpp
+++ b/
check/check_lsolve.cpp
@@
-4,7
+4,7
@@
* symbolic equations. */
/*
* symbolic equations. */
/*
- * GiNaC Copyright (C) 1999-200
0
Johannes Gutenberg University Mainz, Germany
+ * GiNaC Copyright (C) 1999-200
1
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
*
* 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
@@
-22,6
+22,7
@@
*/
#include "checks.h"
*/
#include "checks.h"
+#include <sstream>
static unsigned check_matrix_solve(unsigned m, unsigned n, unsigned p,
unsigned degree)
static unsigned check_matrix_solve(unsigned m, unsigned n, unsigned p,
unsigned degree)
@@
-49,9
+50,9
@@
static unsigned check_matrix_solve(unsigned m, unsigned n, unsigned p,
matrix X(n,p);
for (unsigned i=0; i<n; ++i) {
for (unsigned j=0; j<p; ++j) {
matrix X(n,p);
for (unsigned i=0; i<n; ++i) {
for (unsigned j=0; j<p; ++j) {
-
char buf[4]
;
-
ostrstream(buf,sizeof(buf))
<< i << j << ends;
- x.push_back(symbol(
string("x")+buf
));
+
ostringstream buf
;
+
buf << "x"
<< i << j << ends;
+ x.push_back(symbol(
buf.str()
));
X.set(i,j,x[p*i+j]);
}
}
X.set(i,j,x[p*i+j]);
}
}
@@
-82,9
+83,9
@@
static unsigned check_matrix_solve(unsigned m, unsigned n, unsigned p,
}
if (errorflag) {
clog << "Our solve method claims that A*X==B, with matrices" << endl
}
if (errorflag) {
clog << "Our solve method claims that A*X==B, with matrices" << endl
-
<< "A == " << A << endl
-
<< "X == " << sol << endl
-
<< "B == " << B << endl;
+ << "A == " << A << endl
+ << "X == " << sol << endl
+ << "B == " << B << endl;
return 1;
}
return 1;
}
@@
-101,10
+102,10
@@
static unsigned check_inifcns_lsolve(unsigned n)
vector<symbol> a;
vector<symbol> x;
for (unsigned i=0; i<n; ++i) {
vector<symbol> a;
vector<symbol> x;
for (unsigned i=0; i<n; ++i) {
-
char buf[3]
;
-
ostrstream(buf,sizeof(buf))
<< i << ends;
- a.push_back(symbol(string("a")+buf));
- x.push_back(symbol(string("x")+buf));
+
ostringstream buf
;
+
buf
<< i << ends;
+ a.push_back(symbol(string("a")+buf
.str()
));
+ x.push_back(symbol(string("x")+buf
.str()
));
}
lst eqns; // equation list
lst vars; // variable list
}
lst eqns; // equation list
lst vars; // variable list
@@
-146,7
+147,7
@@
static unsigned check_inifcns_lsolve(unsigned n)
if (errorflag) {
++result;
clog << "solution of the system " << eqns << " for " << vars
if (errorflag) {
++result;
clog << "solution of the system " << eqns << " for " << vars
-
<< " erroneously returned " << sol << endl;
+ << " erroneously returned " << sol << endl;
}
}
}
}
}
}