Stan
1.0
probability, sampling & optimization
src
stan
prob
traits.hpp
Go to the documentation of this file.
1
#ifndef __STAN__PROB__TRAITS_HPP__
2
#define __STAN__PROB__TRAITS_HPP__
3
4
#include <
stan/meta/traits.hpp
>
5
#include <boost/math/tools/promotion.hpp>
6
7
namespace
stan
{
8
9
namespace
prob {
10
29
template
<
bool
propto,
30
typename
T1=double,
typename
T2=double,
31
typename
T3=double,
typename
T4=double,
32
typename
T5=double,
typename
T6=
double
>
33
struct
include_summand
{
34
40
enum
{
41
value
= ( !propto
42
|| !
stan::is_constant<typename scalar_type<T1>::type
>
::value
43
|| !
stan::is_constant<typename scalar_type<T2>::type
>
::value
44
|| !
stan::is_constant<typename scalar_type<T3>::type
>
::value
45
|| !
stan::is_constant<typename scalar_type<T4>::type
>
::value
46
|| !
stan::is_constant<typename scalar_type<T5>::type
>
::value
47
|| !
stan::is_constant<typename scalar_type<T6>::type
>
::value
48
)
49
50
};
51
52
};
53
54
55
}
56
57
}
58
59
#endif
traits.hpp
stan
Probability, optimization and sampling library.
Definition:
agrad.cpp:6
stan::is_constant
Metaprogramming struct to detect whether a given type is constant in the mathematical sense (not the ...
Definition:
traits.hpp:25
stan::prob::include_summand
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...
Definition:
traits.hpp:33
stan::prob::include_summand::value
@ value
Definition:
traits.hpp:41
[
Stan Home Page
]
© 2011–2012, Stan Development Team.