Commit dc054bbc3d1b73058ddc7261e94d31eee3a6a2f1
1 parent
964b64b7
Adapt test scripts to new interfaces
Showing
2 changed files
with
4 additions
and
4 deletions
examples/cpp/numerics/numerics.cpp
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * numerics.cpp - Illustrates numerical class usage * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2013 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2013-2014 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -61,7 +61,7 @@ int main(void) { |
| 61 | 61 | integral.eps(1.0e-8); |
| 62 | 62 | |
| 63 | 63 | // Integrate over the interval [-10,10] |
| 64 | - double result = integral.romb(-15.0, +15.0); | |
| 64 | + double result = integral.romberg(-15.0, +15.0); | |
| 65 | 65 | |
| 66 | 66 | // Print result (should be basically 1) |
| 67 | 67 | std::cout << "Integral: " << result << std::endl; | ... | ... |
examples/cpp/optimize/optimize.cpp
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * optimize.cpp - Illustrates optimizer class usage * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2013 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2013-2014 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -37,7 +37,7 @@ class parabola : public GOptimizerFunction { |
| 37 | 37 | public: |
| 38 | 38 | parabola(void) : m_value(0), m_gradient(1), m_curvature(1,1) {} |
| 39 | 39 | void eval(const GOptimizerPars& pars); |
| 40 | - double value(void) { return m_value; } | |
| 40 | + double value(void) const { return m_value; } | |
| 41 | 41 | GVector* gradient(void) { return &m_gradient; } |
| 42 | 42 | GMatrixSparse* curvature(void) { return &m_curvature; } |
| 43 | 43 | protected: | ... | ... |