非线性方程求解器
更多...
#include <rmvl/core/numcal.hpp>
|
| | NonlinearSolver ()=default |
| |
| | NonlinearSolver (const std::function< double(double)> &f) |
| | 创建非线性方程求解器对象
|
| |
| void | operator= (const std::function< double(double)> &f) |
| | 修改非线性方程 \(f(x)=0\) 的函数对象
|
| |
| double | operator() (double x0, double eps=1e-5, std::size_t max_iter=50) const |
| | 使用离散 Newton 迭代法求解非线性方程 \(f(x)=0\)
|
| |
◆ NonlinearSolver() [1/2]
| rm::NonlinearSolver::NonlinearSolver |
( |
| ) |
|
|
default |
◆ NonlinearSolver() [2/2]
| rm::NonlinearSolver::NonlinearSolver |
( |
const std::function< double(double)> & | f | ) |
|
|
inline |
创建非线性方程求解器对象
- 参数
-
| [in] | f | 非线性方程 \(f(x)=0\) 的函数对象 \(f(x)\) |
- 注解
- 可以是函数指针、函数对象、lambda 表达式等,可隐式转换为
double (*)(double)
◆ operator()()
| double rm::NonlinearSolver::operator() |
( |
double | x0, |
|
|
double | eps = 1e-5, |
|
|
std::size_t | max_iter = 50 ) const |
使用离散 Newton 迭代法求解非线性方程 \(f(x)=0\)
- 参数
-
| [in] | x0 | 迭代初始值 |
| [in] | eps | 精度要求 |
| [in] | max_iter | 最大迭代次数 |
- 返回
- 迭代结果
◆ operator=()
| void rm::NonlinearSolver::operator= |
( |
const std::function< double(double)> & | f | ) |
|
|
inline |
修改非线性方程 \(f(x)=0\) 的函数对象
- 参数
-
| [in] | f | 非线性方程 \(f(x)=0\) 的函数对象 \(f(x)\) |
- 注解
- 可以是函数指针、函数对象、lambda 表达式等,可隐式转换为
double (*)(double)
该类的文档由以下文件生成: