All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
get_lp.hpp
Go to the documentation of this file.
#ifndef STAN_MATH_PRIM_MAT_FUN_GET_LP_HPP
#define STAN_MATH_PRIM_MAT_FUN_GET_LP_HPP
#include <boost/math/tools/promotion.hpp>
#include <stan/math/prim/mat/fun/accumulator.hpp>
namespace stan {
namespace math {
template <typename T_lp, typename T_lp_accum>
inline
typename 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) {
return lp + lp_accum.sum();
}
}
}
#endif
stan::math::accumulator::sum
T sum() const
Return the sum of the accumulated values.
Definition: accumulator.hpp:113
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–2015, Stan Development Team.