Solve algebraic equations using Powell solver.
- Template Parameters
-
F | type of equation system function |
T | type of elements in the x vector |
Args | types of additional parameters to the equation system functor |
- Parameters
-
[in] | f | Functor that evaluates the system of equations |
[in] | x | Vector of starting values (initial guess). |
[in,out] | msgs | the print stream for warning messages. |
[in] | relative_tolerance | determines the convergence criteria for the solution. |
[in] | function_tolerance | determines whether roots are acceptable. |
[in] | max_num_steps | maximum number of function evaluations. |
[in] | args | additional parameters to the equation system functor. |
- Returns
- theta_dbl Double vector of solutions to the system of equations.
- Precondition
- x has size greater than zero.
-
x has only finite elements.
-
f returns finite values when passed any value of x and the given args.
-
relative_tolerance is non-negative.
-
function_tolerance is non-negative.
-
max_num_steps is positive.
- Exceptions
-
<code>std::domain_error</code> | solver exceeds max_num_steps. |
<code>std::domain_error</code> | if the norm of the solution exceeds the function tolerance. |
Definition at line 48 of file solve_powell.hpp.