Stan Math Library: stan/math/prim/mat/fun/get_lp.hpp Source File

| Stan Math Library 2.10.0 reverse mode automatic differentiation

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

get_lp.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_GET_LP_HPP
2 #define STAN_MATH_PRIM_MAT_FUN_GET_LP_HPP
3
4 #include <boost/math/tools/promotion.hpp>
5 #include <stan/math/prim/mat/fun/accumulator.hpp>
6
7 namespace stan {
8
9 namespace math {
10
11 template <typename T_lp, typename T_lp_accum>
12 inline
13 typename boost::math::tools::promote_args<T_lp, T_lp_accum>::type
14 get_lp(const T_lp& lp,
15 const stan::math::accumulator<T_lp_accum>& lp_accum) {
16 return lp + lp_accum.sum();
17 }
18
19 }
20
21 }
22
23 #endif
stan::math::accumulator::sum
T sum() const
Return the sum of the accumulated values.
Definition: accumulator.hpp:113
stan
Definition: log_sum_exp.hpp:8
accumulator.hpp
stan::math::get_lp
boost::math::tools::promote_args< T_lp, T_lp_accum >::type get_lp(const T_lp &lp, const stan::math::accumulator< T_lp_accum > &lp_accum)
Definition: get_lp.hpp:14
stan::math::accumulator
Class to accumulate values and eventually return their sum.
Definition: accumulator.hpp:25

[ Stan Home Page ] © 2011–2016, Stan Development Team.