diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2008-07-03 20:06:40 +0000 |
|---|---|---|
| committer | johanengelen <johanengelen@users.sourceforge.net> | 2008-07-03 20:06:40 +0000 |
| commit | e07de7ce18ff4cc440dc8947d61825122afea062 (patch) | |
| tree | 9ffdd823777582d6b5b8d3de135a03da42041402 /src/2geom/conjugate_gradient.cpp | |
| parent | Patch so Inkscape will compile on Solaris 10 from LP https://bugs.launchpad.n... (diff) | |
| download | inkscape-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.cpp | 7 |
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; |
