Stan  2.5.0
probability, sampling & optimization
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
get_lp.hpp
Go to the documentation of this file.
1 #include <boost/math/tools/promotion.hpp>
3 
4 namespace stan {
5 
6  namespace math {
7 
8  template <typename T_lp, typename T_lp_accum>
9  inline
10  typename boost::math::tools::promote_args<T_lp, T_lp_accum>::type
11  get_lp(const T_lp& lp,
12  const stan::math::accumulator<T_lp_accum>& lp_accum) {
13  return lp + lp_accum.sum();
14  }
15 
16  }
17 
18 }
T sum() const
Return the sum of the accumulated values.
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:11
Class to accumulate values and eventually return their sum.
Definition: accumulator.hpp:25

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