Stan Math Library
2.11.0
reverse mode automatic differentiation
Main Page
Modules
Namespaces
Classes
Files
File List
File Members
stan
math
prim
scal
fun
lbeta.hpp
Go to the documentation of this file.
1
#ifndef STAN_MATH_PRIM_SCAL_FUN_LBETA_HPP
2
#define STAN_MATH_PRIM_SCAL_FUN_LBETA_HPP
3
4
#include <boost/math/tools/promotion.hpp>
5
6
#include <boost/math/special_functions/gamma.hpp>
7
8
namespace
stan
{
9
namespace
math {
10
57
template
<
typename
T1,
typename
T2>
58
inline
typename
boost::math::tools::promote_args<T1, T2>::type
59
lbeta
(
const
T1 a,
const
T2 b) {
60
using
boost::math::lgamma
;
61
return
lgamma
(a)
62
+
lgamma
(b)
63
-
lgamma
(a + b);
64
}
65
66
}
67
}
68
69
#endif
stan::math::lgamma
fvar< T > lgamma(const fvar< T > &x)
Definition:
lgamma.hpp:15
stan
Definition:
log_sum_exp.hpp:8
stan::math::lbeta
fvar< T > lbeta(const fvar< T > &x1, const fvar< T > &x2)
Definition:
lbeta.hpp:16
[
Stan Home Page
]
© 2011–2016, Stan Development Team.