#include <BrentSolver.hpp>
|
| errc_t | solve (UnaryScalarFunc &func, double min, double max, double &result) override |
| |
|
| UnarySolver () |
| |
| | UnarySolver (double relTol, double absTol, int maxIter) |
| |
| | UnarySolver (double absTol) |
| |
| template<typename Func > |
| std::enable_if<!std::is_base_of< UnaryScalarFunc, typenamestd::remove_pointer< Func >::type >::value, errc_t >::type | solve (Func func, double min, double max, double &result) |
| |
| | UnarySolver (double relTol, double absTol, int maxIter) |
| |
| | UnarySolver (double absTol) |
| |
|
double | getRelTol () const |
| |
|
double | getAbsTol () const |
| |
|
int | getMaxIter () const |
| |
|
void | setRelTol (double relTol) |
| |
|
void | setAbsTol (double absTol) |
| |
|
void | setMaxIter (int maxIter) |
| |
|
const SolverStats & | getStats () const |
| |
| template<typename Func > |
| std::enable_if<!std::is_base_of< UnaryScalarFunc, typenamestd::remove_pointer< Func >::type >::value, errc_t >::type | solve (Func func, double min, double max, double &result) |
| |
| virtual errc_t | solve (UnaryScalarFunc &func, double min, double max, double &result)=0 |
| |
|
|
static double | unarycfunc (double x, void *params) |
| |
|
double | relTol_ |
| |
|
double | absTol_ |
| |
|
int | maxIter_ |
| |
|
SolverStats | stats_ |
| |
◆ solve() [1/2]
template<typename Func >
| std::enable_if<!std::is_base_of< UnaryScalarFunc, typenamestd::remove_pointer< Func >::type >::value, errc_t >::type ast::UnarySolver::solve |
( |
Func | func, |
|
|
double | min, |
|
|
double | max, |
|
|
double & | result ) |
|
inline |
求解一元方程(支持lambda函数)
- 模板参数
-
- 参数
-
| func | lambda函数 |
| min | 搜索下限 |
| max | 搜索上限 |
| result | 输出解 |
◆ solve() [2/2]
| errc_t ast::BrenthSolver::solve |
( |
UnaryScalarFunc & | func, |
|
|
double | min, |
|
|
double | max, |
|
|
double & | result ) |
|
overridevirtual |
◆ UnarySolver() [1/2]
| ast::UnarySolver::UnarySolver |
( |
double | absTol | ) |
|
◆ UnarySolver() [2/2]
| ast::UnarySolver::UnarySolver |
( |
double | relTol, |
|
|
double | absTol, |
|
|
int | maxIter ) |
构造函数
- 参数
-
| relTol | 相对误差容限 |
| absTol | 绝对误差容限 |
| maxIter | 最大迭代次数 |
该类的文档由以下文件生成: