diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2013-09-21 09:10:12 +0000 |
|---|---|---|
| committer | Johan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl> | 2013-09-21 09:10:12 +0000 |
| commit | 269b32ee83debc03ec3eb54b41b1f05fcb483e15 (patch) | |
| tree | adda468460aeb9dde89c6ab7259af0a7f61da185 /src | |
| parent | Use viewBox for new documents. (diff) | |
| download | inkscape-269b32ee83debc03ec3eb54b41b1f05fcb483e15.tar.gz inkscape-269b32ee83debc03ec3eb54b41b1f05fcb483e15.zip | |
partial 2geom update, fixes linker errors
(duplicate code, should be fixed later)
(bzr r12558)
Diffstat (limited to 'src')
| -rw-r--r-- | src/2geom/conjugate_gradient.cpp | 5 | ||||
| -rw-r--r-- | src/2geom/conjugate_gradient.h | 12 |
2 files changed, 14 insertions, 3 deletions
diff --git a/src/2geom/conjugate_gradient.cpp b/src/2geom/conjugate_gradient.cpp index ae69d5281..588513414 100644 --- a/src/2geom/conjugate_gradient.cpp +++ b/src/2geom/conjugate_gradient.cpp @@ -36,6 +36,9 @@ /* lifted wholely from wikipedia. */ +namespace Geom +{ + using std::valarray; static void @@ -126,6 +129,8 @@ conjugate_gradient(valarray<double> const &A, // x is solution } +} // namespace Geom + /* Local Variables: mode:c++ diff --git a/src/2geom/conjugate_gradient.h b/src/2geom/conjugate_gradient.h index a34307d4b..4f500c0e6 100644 --- a/src/2geom/conjugate_gradient.h +++ b/src/2geom/conjugate_gradient.h @@ -29,11 +29,14 @@ * */ -#ifndef _CONJUGATE_GRADIENT_H -#define _CONJUGATE_GRADIENT_H +#ifndef _2GEOM_CONJUGATE_GRADIENT_H +#define _2GEOM_CONJUGATE_GRADIENT_H #include <valarray> +namespace Geom +{ + double inner(std::valarray<double> const &x, std::valarray<double> const &y); @@ -44,7 +47,10 @@ conjugate_gradient(std::valarray<double> const &A, std::valarray<double> const &b, unsigned n, double tol, unsigned max_iterations, bool ortho1); -#endif // _CONJUGATE_GRADIENT_H + +} // namespace Geom + +#endif // _2GEOM_CONJUGATE_GRADIENT_H /* Local Variables: |
