Automatic Differentiation
 
Loading...
Searching...
No Matches
algebra_solver_adapter.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_PRIM_FUNCTOR_ALGEBRA_SOLVER_ADAPTER_HPP
2#define STAN_MATH_PRIM_FUNCTOR_ALGEBRA_SOLVER_ADAPTER_HPP
3
4#include <ostream>
5#include <vector>
6
14template <typename F>
16 const F& f_;
17
18 explicit algebra_solver_adapter(const F& f) : f_(f) {}
19
20 template <typename T1, typename... T2>
21 auto operator()(const T1& x, std::ostream* msgs, T2&&... args) const {
22 return f_(x, args..., msgs);
23 }
24};
25
26#endif
auto operator()(const T1 &x, std::ostream *msgs, T2 &&... args) const
Adapt the non-variadic algebra_solver_newton and algebra_solver_powell arguemts to the variadic algeb...