Solve.hpp | Solve.hpp | |||
---|---|---|---|---|

skipping to change at line 16 | skipping to change at line 16 | |||

// modify it under the terms of the GNU General Public License | // modify it under the terms of the GNU General Public License | |||

// as published by the Free Software Foundation; either version 2 | // as published by the Free Software Foundation; either version 2 | |||

// of the License, or (at your option) any later version. | // of the License, or (at your option) any later version. | |||

// | // | |||

// 2008-06-28 - reformatted to comply with Stellarium's coding | // 2008-06-28 - reformatted to comply with Stellarium's coding | |||

// style -MNG | // style -MNG | |||

#ifndef _SOLVE_HPP_ | #ifndef _SOLVE_HPP_ | |||

#define _SOLVE_HPP_ | #define _SOLVE_HPP_ | |||

#include "config.h" | ||||

#include <utility> | #include <utility> | |||

// Solve a function using the bisection method. Returns a pair | // Solve a function using the bisection method. Returns a pair | |||

// with the solution as the first element and the error as the second. | // with the solution as the first element and the error as the second. | |||

template<class T, class F> std::pair<T, T> solveBisection(F f, | template<class T, class F> std::pair<T, T> solveBisection(F f, | |||

T lower, T upper, | T lower, T upper, | |||

T err, | T err, | |||

int maxIter = 100 ) | int maxIter = 100 ) | |||

{ | { | |||

T x = 0.0; | T x = 0.0; | |||

End of changes. 1 change blocks. | ||||

0 lines changed or deleted | | 2 lines changed or added | ||

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |