summaryrefslogtreecommitdiffstats
path: root/src/2geom/conjugate_gradient.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2008-07-03 20:06:40 +0000
committerjohanengelen <johanengelen@users.sourceforge.net>2008-07-03 20:06:40 +0000
commite07de7ce18ff4cc440dc8947d61825122afea062 (patch)
tree9ffdd823777582d6b5b8d3de135a03da42041402 /src/2geom/conjugate_gradient.cpp
parentPatch so Inkscape will compile on Solaris 10 from LP https://bugs.launchpad.n... (diff)
downloadinkscape-e07de7ce18ff4cc440dc8947d61825122afea062.tar.gz
inkscape-e07de7ce18ff4cc440dc8947d61825122afea062.zip
update 2geom (svn rev1433)
(bzr r6134)
Diffstat (limited to 'src/2geom/conjugate_gradient.cpp')
-rw-r--r--src/2geom/conjugate_gradient.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/2geom/conjugate_gradient.cpp b/src/2geom/conjugate_gradient.cpp
index b98bb314c..f5a0f9cd8 100644
--- a/src/2geom/conjugate_gradient.cpp
+++ b/src/2geom/conjugate_gradient.cpp
@@ -32,7 +32,7 @@
#include <stdlib.h>
#include <valarray>
#include <cassert>
-#include "conjugate_gradient.h"
+#include <2geom/conjugate_gradient.h>
/* lifted wholely from wikipedia. */
@@ -55,9 +55,12 @@ matrix_times_vector(valarray<double> const &matrix, /* m * n */
}
}
+/**
+// only used in commented code below
static double Linfty(valarray<double> const &vec) {
return std::max(vec.max(), -vec.min());
}
+**/
double
inner(valarray<double> const &x,
@@ -96,7 +99,7 @@ conjugate_gradient(valarray<double> const &A,
valarray<double> &x,
valarray<double> const &b,
unsigned n, double tol,
- unsigned max_iterations, bool ortho1) {
+ unsigned max_iterations, bool /*ortho1*/) {
valarray<double> Ap(n), p(n), r(n);
matrix_times_vector(A,x,Ap);
r=b-Ap;