Stan Math Library
2.20.0
reverse mode automatic differentiation
stan
math
prim
scal
meta
include_summand.hpp
Go to the documentation of this file.
1
#ifndef STAN_MATH_PRIM_SCAL_META_INCLUDE_SUMMAND_HPP
2
#define STAN_MATH_PRIM_SCAL_META_INCLUDE_SUMMAND_HPP
3
4
#include <
stan/math/prim/scal/meta/is_constant.hpp
>
5
#include <
stan/math/prim/scal/meta/scalar_type.hpp
>
6
7
namespace
stan
{
8
namespace
math {
9
34
template
<
bool
propto,
typename
T = double,
typename
... T_pack>
35
struct
include_summand
{
36
enum
{
37
value
= (!
stan::is_constant_all<typename scalar_type<T>::type
>
::value
38
||
include_summand
<propto, T_pack...>
::value
)
39
};
40
};
41
42
template
<
bool
propto,
typename
T>
43
struct
include_summand
<propto, T> {
49
enum
{
50
value
51
= (!propto || !
stan::is_constant_all<typename scalar_type<T>::type
>
::value
)
52
};
53
};
54
55
}
// namespace math
56
57
}
// namespace stan
58
59
#endif
stan
Definition:
log_sum_exp.hpp:8
stan::math::conjunction
Extends std::true_type when instantiated with zero or more template parameters, all of which extend t...
Definition:
conjunction.hpp:14
stan::math::include_summand
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
Definition:
include_summand.hpp:35
scalar_type.hpp
stan::math::include_summand::value
Definition:
include_summand.hpp:37
is_constant.hpp
[
Stan Home Page
]
© 2011–2018, Stan Development Team.