Automatic Differentiation
 
Loading...
Searching...
No Matches
conditional_var_value.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_REV_META_CONDITIONAL_VAR_EIGEN_HPP
2#define STAN_MATH_REV_META_CONDITIONAL_VAR_EIGEN_HPP
3
7
8namespace stan {
9
18template <typename T_scalar, typename T_container, typename = void>
20 using type = std::conditional_t<is_var<scalar_type_t<T_scalar>>::value,
24};
25template <typename T_scalar, typename T_container>
26struct conditional_var_value<T_scalar, T_container,
27 require_std_vector_t<T_container>> {
28 using type = std::vector<typename conditional_var_value<
30};
31
32template <typename T_scalar, typename T_container>
35
36} // namespace stan
37
38#endif
require_t< is_std_vector< std::decay_t< T > > > require_std_vector_t
Require type satisfies is_std_vector.
typename value_type< T >::type value_type_t
Helper function for accessing underlying type.
typename promote_scalar_type< std::decay_t< T >, std::decay_t< S > >::type promote_scalar_t
typename plain_type< T >::type plain_type_t
typename conditional_var_value< T_scalar, T_container >::type conditional_var_value_t
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
std::vector< typename conditional_var_value< T_scalar, value_type_t< T_container > >::type > type
std::conditional_t< is_var< scalar_type_t< T_scalar > >::value, math::var_value< math::promote_scalar_t< double, plain_type_t< T_container > > >, plain_type_t< T_container > > type
Conditionally construct a var_value container based on a scalar type.