Automatic Differentiation
 
Loading...
Searching...
No Matches
is_eigen.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_PRIM_META_IS_EIGEN_HPP
2#define STAN_MATH_PRIM_META_IS_EIGEN_HPP
3
9#include <type_traits>
10
11namespace stan {
12
19template <typename T>
21 : bool_constant<is_base_pointer_convertible<Eigen::EigenBase, T>::value> {};
22
30template <typename T>
31struct scalar_type<T, std::enable_if_t<is_eigen<T>::value>> {
33};
34
42template <typename T>
43struct value_type<T, std::enable_if_t<is_eigen<T>::value>> {
44 using type = typename std::decay_t<T>::Scalar;
45};
46
54template <typename T>
56
59template <typename T>
61
64template <typename... Types>
66
69template <typename... Types>
71
74template <typename... Types>
77
80template <typename... Types>
95template <template <class...> class TypeCheck, class... Check>
97 container_type_check_base<is_eigen, value_type_t, TypeCheck, Check...>>;
98
104template <template <class...> class TypeCheck, class... Check>
106 container_type_check_base<is_eigen, value_type_t, TypeCheck, Check...>>;
107
113template <template <class...> class TypeCheck, class... Check>
116
122template <template <class...> class TypeCheck, class... Check>
125
131template <template <class...> class TypeCheck, class... Check>
134
140template <template <class...> class TypeCheck, class... Check>
143
149template <template <class...> class TypeCheck, class... Check>
151 container_type_check_base<is_eigen, scalar_type_t, TypeCheck, Check...>>;
152
158template <template <class...> class TypeCheck, class... Check>
160 container_type_check_base<is_eigen, scalar_type_t, TypeCheck, Check...>>;
161
167template <template <class...> class TypeCheck, class... Check>
170
176template <template <class...> class TypeCheck, class... Check>
179
185template <template <class...> class TypeCheck, class... Check>
188
194template <template <class...> class TypeCheck, class... Check>
204template <typename T>
206 : bool_constant<is_base_pointer_convertible<Eigen::ArrayBase, T>::value> {};
207
215template <typename T>
217
220template <typename T>
223
226template <typename... Types>
236template <typename T>
239
250template <template <class...> class TypeCheck, class... Check>
253 TypeCheck, Check...>>;
256namespace internal {
257template <typename T>
258struct is_eigen_contiguous_map_impl : std::false_type {};
259template <typename T, int Opts>
260struct is_eigen_contiguous_map_impl<Eigen::Map<T, Opts, Eigen::Stride<0, 0>>>
261 : std::true_type {};
262
263} // namespace internal
264
269template <typename T>
271 : internal::is_eigen_contiguous_map_impl<std::decay_t<T>> {};
272
273} // namespace stan
274#endif
require_any_t< is_eigen_array< std::decay_t< Types > >... > require_any_eigen_array_t
Require any of the types satisfy is_eigen_array.
Definition is_eigen.hpp:228
require_t< container_type_check_base< is_eigen_array, value_type_t, TypeCheck, Check... > > require_eigen_array_vt
Require type satisfies is_eigen_array.
Definition is_eigen.hpp:253
require_t< is_eigen_array< std::decay_t< T > > > require_eigen_array_t
Require type satisfies is_eigen_array.
Definition is_eigen.hpp:216
require_not_t< is_eigen_array< std::decay_t< T > > > require_not_eigen_array_t
Require type does not satisfy is_eigen_array.
Definition is_eigen.hpp:222
require_all_t< container_type_check_base< is_eigen, value_type_t, TypeCheck, Check >... > require_all_eigen_vt
Require all of the types satisfy is_eigen.
Definition is_eigen.hpp:133
require_any_t< is_eigen< std::decay_t< Types > >... > require_any_eigen_t
Require any of the types satisfy is_eigen.
Definition is_eigen.hpp:70
require_any_not_t< container_type_check_base< is_eigen, scalar_type_t, TypeCheck, Check >... > require_any_not_eigen_st
Require at least one of the types does not satisfy is_eigen.
Definition is_eigen.hpp:178
require_t< container_type_check_base< is_eigen, value_type_t, TypeCheck, Check... > > require_eigen_vt
Require type satisfies is_eigen.
Definition is_eigen.hpp:97
require_t< container_type_check_base< is_eigen, scalar_type_t, TypeCheck, Check... > > require_eigen_st
Require type satisfies is_eigen.
Definition is_eigen.hpp:151
require_all_t< is_eigen< std::decay_t< Types > >... > require_all_eigen_t
Require all of the types satisfy is_eigen.
Definition is_eigen.hpp:65
require_t< is_eigen< std::decay_t< T > > > require_eigen_t
Require type satisfies is_eigen.
Definition is_eigen.hpp:55
require_all_not_t< container_type_check_base< is_eigen, scalar_type_t, TypeCheck, Check >... > require_all_not_eigen_st
Require none of the types satisfy is_eigen.
Definition is_eigen.hpp:196
require_all_not_t< is_eigen< std::decay_t< Types > >... > require_all_not_eigen_t
Require none of the types satisfy is_eigen.
Definition is_eigen.hpp:76
require_any_t< container_type_check_base< is_eigen, scalar_type_t, TypeCheck, Check >... > require_any_eigen_st
Require any of the types satisfy is_eigen.
Definition is_eigen.hpp:169
require_not_t< container_type_check_base< is_eigen, value_type_t, TypeCheck, Check... > > require_not_eigen_vt
Require type does not satisfy is_eigen or.
Definition is_eigen.hpp:106
require_all_t< container_type_check_base< is_eigen, scalar_type_t, TypeCheck, Check >... > require_all_eigen_st
Require all of the types does not satisfy is_eigen.
Definition is_eigen.hpp:187
require_not_t< container_type_check_base< is_eigen, scalar_type_t, TypeCheck, Check... > > require_not_eigen_st
Require type does not satisfy is_eigen.
Definition is_eigen.hpp:160
require_not_t< is_eigen< std::decay_t< T > > > require_not_eigen_t
Require type does not satisfy is_eigen.
Definition is_eigen.hpp:60
require_all_not_t< container_type_check_base< is_eigen, value_type_t, TypeCheck, Check >... > require_all_not_eigen_vt
Require none of the types satisfy is_eigen.
Definition is_eigen.hpp:142
require_any_t< container_type_check_base< is_eigen, value_type_t, TypeCheck, Check >... > require_any_eigen_vt
Require any of the types satisfy is_eigen.
Definition is_eigen.hpp:115
require_any_not_t< is_eigen< std::decay_t< Types > >... > require_any_not_eigen_t
Require at least one of the types do not satisfy is_eigen.
Definition is_eigen.hpp:82
require_any_not_t< container_type_check_base< is_eigen, value_type_t, TypeCheck, Check >... > require_any_not_eigen_vt
Require at least one of the types does not satisfy is_eigen.
Definition is_eigen.hpp:124
typename value_type< T >::type value_type_t
Helper function for accessing underlying type.
(Expert) Numerical traits for algorithmic differentiation variables.
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.
typename scalar_type< T >::type scalar_type_t
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.
Check if a type is derived from Eigen::ArrayBase
Definition is_eigen.hpp:206
Check if a type is an Eigen::Map with contiguous stride.
Definition is_eigen.hpp:271
Check if type derives from EigenBase
Definition is_eigen.hpp:21
Extends std::false_type when instantiated with zero or more template parameters, all of which extend ...
scalar_type_t< typename std::decay_t< T >::Scalar > type
Definition is_eigen.hpp:32
Metaprogram structure to determine the base scalar type of a template argument.
Primary template class for metaprogram to compute the type of values stored in a container.