include_summand.hpp
Go to the documentation of this file.
#ifndef STAN_MATH_PRIM_SCAL_META_INCLUDE_SUMMAND_HPP
#define STAN_MATH_PRIM_SCAL_META_INCLUDE_SUMMAND_HPP
#include <stan/math/prim/scal/meta/is_constant.hpp>
#include <stan/math/prim/scal/meta/scalar_type.hpp>
#include <boost/math/tools/promotion.hpp>
namespace stan {
namespace math {
template <bool propto,
typename T1 = double, typename T2 = double,
typename T3 = double, typename T4 = double,
typename T5 = double, typename T6 = double,
typename T7 = double, typename T8 = double,
typename T9 = double, typename T10 = double>
struct include_summand {
enum {
value = (!propto
|| !stan::is_constant<typename scalar_type<T1>::type>::value
|| !stan::is_constant<typename scalar_type<T2>::type>::value
|| !stan::is_constant<typename scalar_type<T3>::type>::value
|| !stan::is_constant<typename scalar_type<T4>::type>::value
|| !stan::is_constant<typename scalar_type<T5>::type>::value
|| !stan::is_constant<typename scalar_type<T6>::type>::value
|| !stan::is_constant<typename scalar_type<T7>::type>::value
|| !stan::is_constant<typename scalar_type<T8>::type>::value
|| !stan::is_constant<typename scalar_type<T9>::type>::value
|| !stan::is_constant<typename scalar_type<T10>::type>::value
)
};
};
}
}
#endif
stan::is_constant
Metaprogramming struct to detect whether a given type is constant in the mathematical sense (not the ...
Definition: is_constant.hpp:22
stan
Definition: log_sum_exp.hpp:8
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:42
is_constant.hpp

[ Stan Home Page ] © 2011–2016, Stan Development Team.