@@ -226,13 +226,11 @@ Eigen::Matrix<T2, Eigen::Dynamic, 1> general_algebra_solver_non_varia(
226226
227227 Eigen::Matrix<T2, Eigen::Dynamic, 1 > theta;
228228 if (!is_newton) {
229- theta = algebra_solver (f, x, y, dat,
230- dat_int, msgs, relative_tolerance,
229+ theta = algebra_solver (f, x, y, dat, dat_int, msgs, relative_tolerance,
231230 function_tolerance, max_num_steps);
232231 } else {
233232 theta
234- = algebra_solver_newton (f, x, y,
235- dat, dat_int, msgs, scaling_step_size,
233+ = algebra_solver_newton (f, x, y, dat, dat_int, msgs, scaling_step_size,
236234 function_tolerance, max_num_steps);
237235 }
238236 return theta;
@@ -280,8 +278,8 @@ struct simple_eq_functor_nopara {
280278struct non_linear_eq_functor {
281279 template <typename T1, typename T2, typename T3, typename T4>
282280 inline Eigen::Matrix<stan::return_type_t <T1, T2>, Eigen::Dynamic, 1 >
283- operator ()(const T1& x, std::ostream* pstream__,
284- const T2& y, const T3& dat, const T4& dat_int) const {
281+ operator ()(const T1& x, std::ostream* pstream__, const T2& y, const T3& dat,
282+ const T4& dat_int) const {
285283 Eigen::Matrix<stan::return_type_t <T1, T2>, Eigen::Dynamic, 1 > z (3 );
286284 z (0 ) = x (2 ) - y (2 );
287285 z (1 ) = x (0 ) * x (1 ) - y (0 ) * y (1 );
@@ -519,7 +517,6 @@ inline void max_num_steps_test(Eigen::Matrix<T, Eigen::Dynamic, 1>& y,
519517 std::domain_error);
520518}
521519
522-
523520Eigen::Matrix<stan::math::var, Eigen::Dynamic, 1 > variadic_eq_impl_test (
524521 const Eigen::Matrix<stan::math::var, Eigen::Dynamic, Eigen::Dynamic> A,
525522 const stan::math::var& y_1, const stan::math::var& y_2,
@@ -539,18 +536,18 @@ Eigen::Matrix<stan::math::var, Eigen::Dynamic, 1> variadic_eq_impl_test(
539536 Eigen::Matrix<var, Eigen::Dynamic, 1 > theta;
540537
541538 theta = is_newton
542- ? use_tol ? solve_newton_tol (variadic_eq_functor (), x,
543- relative_tolerance,
544- function_tolerance, max_num_steps,
545- &std::cout, A, y_1, y_2, y_3, i)
546- : solve_newton (variadic_eq_functor (), x, &std::cout,
547- A, y_1, y_2, y_3, i)
548- : use_tol ? solve_powell_tol (variadic_eq_functor (), x,
549- relative_tolerance,
550- function_tolerance, max_num_steps,
551- &std::cout, A, y_1, y_2, y_3, i)
552- : solve_powell (variadic_eq_functor (), x, &std::cout,
553- A, y_1, y_2, y_3, i);
539+ ? use_tol ? solve_newton_tol (variadic_eq_functor (), x,
540+ relative_tolerance,
541+ function_tolerance, max_num_steps,
542+ &std::cout, A, y_1, y_2, y_3, i)
543+ : solve_newton (variadic_eq_functor (), x, &std::cout, A ,
544+ y_1, y_2, y_3, i)
545+ : use_tol ? solve_powell_tol (variadic_eq_functor (), x,
546+ relative_tolerance,
547+ function_tolerance, max_num_steps,
548+ &std::cout, A, y_1, y_2, y_3, i)
549+ : solve_powell (variadic_eq_functor (), x, &std::cout, A ,
550+ y_1, y_2, y_3, i);
554551
555552 EXPECT_NEAR (20 , value_of (theta (0 )), 1e-6 );
556553 EXPECT_NEAR (2 , value_of (theta (1 )), 1e-6 );
0 commit comments