Exemplo n.º 1
0
 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();
 }
Exemplo n.º 2
0
// test sum of first n numbers for sum of a
void test_sum(stan::math::accumulator<stan::math::var>& a,
              int n) {
  EXPECT_FLOAT_EQ((n * (n + 1)) / 2, a.sum().val());
}
Exemplo n.º 3
0
void test_sum(stan::math::accumulator<T>& a,
              int n) {
  EXPECT_TRUE((n * (n + 1)) / 2 == a.sum());
}