Automatic Differentiation
 
Loading...
Searching...
No Matches
is_var.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_PRIM_META_IS_VAR_HPP
2#define STAN_MATH_PRIM_META_IS_VAR_HPP
3
5
6#include <type_traits>
7
8namespace stan {
13template <typename T, typename = void>
14struct is_var : std::false_type {};
15
23template <typename T>
25
28template <typename T>
30
33template <typename... Types>
35
38template <typename... Types>
40
43template <typename... Types>
45
48template <typename... Types>
62template <template <class...> class TypeCheck, class... Check>
64 container_type_check_base<is_var, value_type_t, TypeCheck, Check...>>;
65
71template <template <class...> class TypeCheck, class... Check>
74
80template <template <class...> class TypeCheck, class... Check>
91template <typename T>
93
97template <typename... Types>
100
104template <typename... Types>
107
110template <typename T>
112
115template <typename T>
118
122template <typename... Types>
125
129template <typename... Types>
132
136template <typename... Types>
141template <typename T>
142struct value_type<T, std::enable_if_t<is_var<T>::value>> {
143 using type = typename std::decay_t<T>::value_type;
144};
145
146} // namespace stan
147#endif
typename value_type< T >::type value_type_t
Helper function for accessing underlying type.
require_all_not_t< is_var< scalar_type_t< std::decay_t< Types > > >... > require_all_not_st_var
Require none of the scalar types satisfy is_var.
Definition is_var.hpp:138
require_not_t< is_var< std::decay_t< T > > > require_not_var_t
Require type does not satisfy is_var.
Definition is_var.hpp:29
require_not_t< is_var< scalar_type_t< std::decay_t< T > > > > require_not_st_var
Require scalar type does not satisfy is_var.
Definition is_var.hpp:117
require_t< container_type_check_base< is_var, value_type_t, TypeCheck, Check... > > require_var_vt
Require type satisfies is_var.
Definition is_var.hpp:64
require_all_t< is_var< std::decay_t< Types > >... > require_all_var_t
Require all of the types satisfy is_var.
Definition is_var.hpp:34
require_any_t< is_var< value_type_t< std::decay_t< Types > > >... > require_any_vt_var
Require any of the value_types satisfy is_var.
Definition is_var.hpp:99
require_all_not_t< is_var< value_type_t< std::decay_t< Types > > >... > require_all_not_vt_var
Require none of the value_types satisfy is_var.
Definition is_var.hpp:106
require_any_not_t< is_var< std::decay_t< Types > >... > require_any_not_var_t
Require at least one of the types do not satisfy is_var.
Definition is_var.hpp:49
require_not_t< is_var< value_type_t< std::decay_t< T > > > > require_not_vt_var
Require value type does not satisfy is_var.
Definition is_var.hpp:92
require_any_t< is_var< std::decay_t< Types > >... > require_any_var_t
Require any of the types satisfy is_var.
Definition is_var.hpp:39
require_any_t< container_type_check_base< is_var, value_type_t, TypeCheck, Check >... > require_any_var_vt
Require any of the types satisfy is_var.
Definition is_var.hpp:73
require_t< is_var< scalar_type_t< std::decay_t< T > > > > require_st_var
Require scalar_type satisfies is_var.
Definition is_var.hpp:111
require_t< is_var< std::decay_t< T > > > require_var_t
Require type satisfies is_var.
Definition is_var.hpp:24
require_all_t< is_var< scalar_type_t< std::decay_t< Types > > >... > require_all_st_var
Require all of the scalar types satisfy is_var.
Definition is_var.hpp:124
require_all_not_t< is_var< std::decay_t< Types > >... > require_all_not_var_t
Require none of the types satisfy is_var.
Definition is_var.hpp:44
require_all_t< container_type_check_base< is_var, value_type_t, TypeCheck, Check >... > require_all_var_vt
Require all of the types satisfy is_var.
Definition is_var.hpp:82
require_any_t< is_var< scalar_type_t< std::decay_t< Types > > >... > require_any_st_var
Require any of the scalar types satisfy is_var.
Definition is_var.hpp:131
std::enable_if_t<!Check::value > require_not_t
If condition is false, template is disabled.
std::enable_if_t< math::disjunction< Checks... >::value > require_any_t
If any condition is true, template is enabled.
std::enable_if_t<!math::disjunction< Checks... >::value > require_all_not_t
If all conditions are false, template is enabled.
bool_constant< math::conjunction< ContainerCheck< std::decay_t< Check > >..., TypeCheck< ValueCheck< Check > >... >::value > container_type_check_base
Used as the base for checking whether a type is a container with an underlying scalar type.
std::enable_if_t<!math::conjunction< Checks... >::value > require_any_not_t
If any condition is false, template is enabled.
std::enable_if_t< Check::value > require_t
If condition is true, template is enabled.
std::enable_if_t< math::conjunction< Checks... >::value > require_all_t
If all conditions are true, template is enabled Returns a type void if all conditions are true and ot...
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
STL namespace.
Defines a static member named value which is defined to be false as the primitive scalar types cannot...
Definition is_var.hpp:14
typename std::decay_t< T >::value_type type
Definition is_var.hpp:143
Primary template class for metaprogram to compute the type of values stored in a container.