Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ solve_powell_call_solver()

template<typename F , typename T , typename... Args, require_eigen_vector_t< T > * = nullptr>
T & stan::math::solve_powell_call_solver ( const F &  f,
T &  x,
std::ostream *const  msgs,
const double  relative_tolerance,
const double  function_tolerance,
const int64_t  max_num_steps,
const Args &...  args 
)

Solve algebraic equations using Powell solver.

Template Parameters
Ftype of equation system function
Ttype of elements in the x vector
Argstypes of additional parameters to the equation system functor
Parameters
[in]fFunctor that evaluates the system of equations
[in]xVector of starting values (initial guess).
[in,out]msgsthe print stream for warning messages.
[in]relative_tolerancedetermines the convergence criteria for the solution.
[in]function_tolerancedetermines whether roots are acceptable.
[in]max_num_stepsmaximum number of function evaluations.
[in]argsadditional 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.