1#ifndef STAN_MATH_PRIM_META_IS_VECTOR_HPP
2#define STAN_MATH_PRIM_META_IS_VECTOR_HPP
18template <
typename T,
typename =
void>
26template <typename T, bool = is_eigen<T>::value>
39template <typename T, bool = is_eigen<T>::value>
41 : std::integral_constant<bool, std::decay_t<T>::RowsAtCompileTime == 1> {};
52template <typename T, bool = bool_constant<is_eigen<T>::value
67template <typename T, bool = bool_constant<is_eigen<T>::value
71 :
std::integral_constant<bool,
std::decay_t<T>::RowsAtCompileTime == 1> {};
108template <
typename... Types>
123template <
template <
class...>
class TypeCheck,
class... Check>
126 TypeCheck, Check...>>;
155template <
typename... Types>
207 || is_eigen_row_vector<T>::value> {};
227template <
typename... Types>
233template <
typename... Types>
239template <
typename... Types>
246template <
typename... Types>
261template <
template <
class...>
class TypeCheck,
class... Check>
264 TypeCheck, Check...>>;
271template <
template <
class...>
class TypeCheck,
class... Check>
274 TypeCheck, Check...>>;
281template <
template <
class...>
class TypeCheck,
class... Check>
284 TypeCheck, Check>...>;
292template <
template <
class...>
class TypeCheck,
class... Check>
295 TypeCheck, Check>...>;
302template <
template <
class...>
class TypeCheck,
class... Check>
305 TypeCheck, Check>...>;
312template <
template <
class...>
class TypeCheck,
class... Check>
315 TypeCheck, Check>...>;
322template <
template <
class...>
class TypeCheck,
class... Check>
325 TypeCheck, Check...>>;
332template <
template <
class...>
class TypeCheck,
class... Check>
335 TypeCheck, Check...>>;
342template <
template <
class...>
class TypeCheck,
class... Check>
345 TypeCheck, Check>...>;
353template <
template <
class...>
class TypeCheck,
class... Check>
363template <
template <
class...>
class TypeCheck,
class... Check>
366 TypeCheck, Check>...>;
373template <
template <
class...>
class TypeCheck,
class... Check>
383template <
typename Row,
typename Col>
391template <
typename Row,
typename Col>
399template <
typename Row,
typename Col>
407template <
typename Row,
typename Col>
419 :
bool_constant<is_eigen_vector<T>::value || is_std_vector<T>::value
421 && is_eigen_vector<value_type_t<T>>::value)> {};
440template <
typename... Types>
445template <
typename... Types>
450template <
typename... Types>
456template <
typename... Types>
471template <
template <
class...>
class TypeCheck,
class... Check>
480template <
template <
class...>
class TypeCheck,
class... Check>
489template <
template <
class...>
class TypeCheck,
class... Check>
498template <
template <
class...>
class TypeCheck,
class... Check>
507template <
template <
class...>
class TypeCheck,
class... Check>
516template <
template <
class...>
class TypeCheck,
class... Check>
525template <
template <
class...>
class TypeCheck,
class... Check>
534template <
template <
class...>
class TypeCheck,
class... Check>
543template <
template <
class...>
class TypeCheck,
class... Check>
552template <
template <
class...>
class TypeCheck,
class... Check>
561template <
template <
class...>
class TypeCheck,
class... Check>
570template <
template <
class...>
class TypeCheck,
class... Check>
587template <
typename... Args>
597 T,
std::enable_if_t<internal::is_std_vector_impl<std::decay_t<T>>::value>>
619 using type =
typename std::decay_t<T>::value_type;
639template <
typename... Types>
645template <
typename... Types>
651template <
typename... Types>
658template <
typename... Types>
673template <
template <
class...>
class TypeCheck,
class... Check>
676 TypeCheck, Check...>>;
683template <
template <
class...>
class TypeCheck,
class... Check>
686 TypeCheck, Check...>>;
693template <
template <
class...>
class TypeCheck,
class... Check>
696 TypeCheck, Check>...>;
704template <
template <
class...>
class TypeCheck,
class... Check>
707 TypeCheck, Check>...>;
714template <
template <
class...>
class TypeCheck,
class... Check>
717 TypeCheck, Check>...>;
724template <
template <
class...>
class TypeCheck,
class... Check>
727 TypeCheck, Check>...>;
734template <
template <
class...>
class TypeCheck,
class... Check>
737 TypeCheck, Check...>>;
744template <
template <
class...>
class TypeCheck,
class... Check>
747 TypeCheck, Check...>>;
754template <
template <
class...>
class TypeCheck,
class... Check>
757 TypeCheck, Check>...>;
765template <
template <
class...>
class TypeCheck,
class... Check>
768 TypeCheck, Check>...>;
775template <
template <
class...>
class TypeCheck,
class... Check>
778 TypeCheck, Check>...>;
785template <
template <
class...>
class TypeCheck,
class... Check>
788 TypeCheck, Check>...>;
require_t< is_col_vector< std::decay_t< T > > > require_col_vector_t
Require type satisfies is_col_vector.
require_not_t< is_col_vector< std::decay_t< T > > > require_not_col_vector_t
Require type does not satisfy is_col_vector.
require_all_t< is_col_vector< std::decay_t< Types > >... > require_all_col_vector_t
Require all of the types satisfy is_col_vector.
require_t< container_type_check_base< is_eigen_col_vector, value_type_t, TypeCheck, Check... > > require_eigen_col_vector_vt
Require type satisfies is_eigen_col_vector.
require_t< is_eigen_col_vector< std::decay_t< T > > > require_eigen_col_vector_t
Require type satisfies is_eigen_col_vector.
require_not_t< is_eigen_col_vector< std::decay_t< T > > > require_not_eigen_col_vector_t
Require type does not satisfy is_eigen_col_vector.
require_all_t< is_eigen_col_vector< std::decay_t< Types > >... > require_all_eigen_col_vector_t
Require all of the types satisfy is_eigen_col_vector.
require_t< is_eigen_row_vector< std::decay_t< T > > > require_eigen_row_vector_t
Require type satisfies is_eigen_row_vector.
require_any_not_t< container_type_check_base< is_eigen_vector, value_type_t, TypeCheck, Check >... > require_any_not_eigen_vector_vt
Require at least one of the types does not satisfy is_eigen_vector.
require_all_not_t< is_eigen_vector< std::decay_t< Types > >... > require_all_not_eigen_vector_t
Require none of the types satisfy is_eigen_vector.
require_all_not_t< container_type_check_base< is_eigen_vector, value_type_t, TypeCheck, Check >... > require_all_not_eigen_vector_vt
Require none of the types satisfy is_eigen_vector.
require_not_t< container_type_check_base< is_eigen_vector, value_type_t, TypeCheck, Check... > > require_not_eigen_vector_vt
Require type does not satisfy is_eigen_vector or.
require_not_t< container_type_check_base< is_eigen_vector, scalar_type_t, TypeCheck, Check... > > require_not_eigen_vector_st
Require type does not satisfy is_eigen_vector.
require_any_t< container_type_check_base< is_eigen_vector, value_type_t, TypeCheck, Check >... > require_any_eigen_vector_vt
Require any of the types satisfy is_eigen_vector.
require_all_t< container_type_check_base< is_eigen_vector, value_type_t, TypeCheck, Check >... > require_all_eigen_vector_vt
Require all of the types satisfy is_eigen_vector.
require_t< is_eigen_vector< std::decay_t< T > > > require_eigen_vector_t
Require type satisfies is_eigen_vector.
require_t< container_type_check_base< is_eigen_vector, value_type_t, TypeCheck, Check... > > require_eigen_vector_vt
Require type satisfies is_eigen_vector.
require_any_t< container_type_check_base< is_eigen_vector, scalar_type_t, TypeCheck, Check >... > require_any_eigen_vector_st
Require any of the types satisfy is_eigen_vector.
require_not_t< is_eigen_vector< std::decay_t< T > > > require_not_eigen_vector_t
Require type does not satisfy is_eigen_vector.
require_all_not_t< container_type_check_base< is_eigen_vector, scalar_type_t, TypeCheck, Check >... > require_all_not_eigen_vector_st
Require none of the types satisfy is_eigen_vector.
require_any_not_t< container_type_check_base< is_eigen_vector, scalar_type_t, TypeCheck, Check >... > require_any_not_eigen_vector_st
Require at least one of the types does not satisfy is_eigen_vector.
require_any_t< is_eigen_vector< std::decay_t< Types > >... > require_any_eigen_vector_t
Require any of the types satisfy is_eigen_vector.
require_any_not_t< is_eigen_vector< std::decay_t< Types > >... > require_any_not_eigen_vector_t
Require at least one of the types do not satisfy is_eigen_vector.
require_all_t< is_eigen_vector< std::decay_t< Types > >... > require_all_eigen_vector_t
Require all of the types satisfy is_eigen_vector.
require_t< container_type_check_base< is_eigen_vector, scalar_type_t, TypeCheck, Check... > > require_eigen_vector_st
Require type satisfies is_eigen_vector.
require_all_t< container_type_check_base< is_eigen_vector, scalar_type_t, TypeCheck, Check >... > require_all_eigen_vector_st
Require all of the types does not satisfy is_eigen_vector.
require_t< is_row_vector< std::decay_t< T > > > require_row_vector_t
Require type satisfies is_row_vector.
require_any_not_t< container_type_check_base< is_std_vector, value_type_t, TypeCheck, Check >... > require_any_not_std_vector_vt
Require at least one of the types does not satisfy is_std_vector.
require_not_t< is_std_vector< std::decay_t< T > > > require_not_std_vector_t
Require type does not satisfy is_std_vector.
require_t< container_type_check_base< is_std_vector, value_type_t, TypeCheck, Check... > > require_std_vector_vt
Require type satisfies is_std_vector.
require_all_not_t< container_type_check_base< is_std_vector, scalar_type_t, TypeCheck, Check >... > require_all_not_std_vector_st
Require none of the types satisfy is_std_vector.
require_any_t< container_type_check_base< is_std_vector, value_type_t, TypeCheck, Check >... > require_any_std_vector_vt
Require any of the types satisfy is_std_vector.
require_not_t< container_type_check_base< is_std_vector, value_type_t, TypeCheck, Check... > > require_not_std_vector_vt
Require type does not satisfy is_std_vector or.
require_t< container_type_check_base< is_std_vector, scalar_type_t, TypeCheck, Check... > > require_std_vector_st
Require type satisfies is_std_vector.
require_any_t< is_std_vector< std::decay_t< Types > >... > require_any_std_vector_t
Require any of the types satisfy is_std_vector.
require_all_not_t< is_std_vector< std::decay_t< Types > >... > require_all_not_std_vector_t
Require none of the types satisfy is_std_vector.
require_t< is_std_vector< std::decay_t< T > > > require_std_vector_t
Require type satisfies is_std_vector.
require_any_not_t< container_type_check_base< is_std_vector, scalar_type_t, TypeCheck, Check >... > require_any_not_std_vector_st
Require at least one of the types does not satisfy is_std_vector.
require_not_t< container_type_check_base< is_std_vector, scalar_type_t, TypeCheck, Check... > > require_not_std_vector_st
Require type does not satisfy is_std_vector.
require_all_t< container_type_check_base< is_std_vector, value_type_t, TypeCheck, Check >... > require_all_std_vector_vt
Require all of the types satisfy is_std_vector.
require_all_t< is_std_vector< std::decay_t< Types > >... > require_all_std_vector_t
Require all of the types satisfy is_std_vector.
require_all_t< container_type_check_base< is_std_vector, scalar_type_t, TypeCheck, Check >... > require_all_std_vector_st
Require all of the types does not satisfy is_std_vector.
require_any_t< container_type_check_base< is_std_vector, scalar_type_t, TypeCheck, Check >... > require_any_std_vector_st
Require any of the types satisfy is_std_vector.
require_all_not_t< container_type_check_base< is_std_vector, value_type_t, TypeCheck, Check >... > require_all_not_std_vector_vt
Require none of the types satisfy is_std_vector.
require_any_not_t< is_std_vector< std::decay_t< Types > >... > require_any_not_std_vector_t
Require at least one of the types do not satisfy is_std_vector.
typename value_type< T >::type value_type_t
Helper function for accessing underlying type.
require_t< container_type_check_base< is_vector, value_type_t, TypeCheck, Check... > > require_vector_vt
Require type satisfies is_vector.
require_not_t< container_type_check_base< is_vector, scalar_type_t, TypeCheck, Check... > > require_not_vector_st
Require type does not satisfy is_vector.
require_all_t< is_vector< std::decay_t< Types > >... > require_all_vector_t
Require all of the types satisfy is_vector.
require_t< container_type_check_base< is_vector, scalar_type_t, TypeCheck, Check... > > require_vector_st
Require type satisfies is_vector.
require_t< is_vector< std::decay_t< T > > > require_vector_t
Require type satisfies is_vector.
require_all_not_t< container_type_check_base< is_vector, scalar_type_t, TypeCheck, Check >... > require_all_not_vector_st
Require none of the types satisfy is_vector.
require_any_not_t< is_vector< std::decay_t< Types > >... > require_any_not_vector_t
Require at least one of the types do not satisfy is_vector.
require_all_t< container_type_check_base< is_vector, value_type_t, TypeCheck, Check >... > require_all_vector_vt
Require all of the types satisfy is_vector.
require_any_not_t< container_type_check_base< is_vector, value_type_t, TypeCheck, Check >... > require_any_not_vector_vt
Require at least one of the types does not satisfy is_vector.
require_not_t< container_type_check_base< is_vector, value_type_t, TypeCheck, Check... > > require_not_vector_vt
Require type does not satisfy is_vector or.
require_all_t< container_type_check_base< is_vector, scalar_type_t, TypeCheck, Check >... > require_all_vector_st
Require all of the types does not satisfy is_vector.
require_any_t< container_type_check_base< is_vector, scalar_type_t, TypeCheck, Check >... > require_any_vector_st
Require any of the types satisfy is_vector.
require_any_t< container_type_check_base< is_vector, value_type_t, TypeCheck, Check >... > require_any_vector_vt
Require any of the types satisfy is_vector.
require_all_not_t< is_vector< std::decay_t< Types > >... > require_all_not_vector_t
Require none of the types satisfy is_vector.
require_not_t< is_vector< std::decay_t< T > > > require_not_vector_t
Require type does not satisfy is_vector.
require_any_not_t< container_type_check_base< is_vector, scalar_type_t, TypeCheck, Check >... > require_any_not_vector_st
Require at least one of the types does not satisfy is_vector.
require_any_t< is_vector< std::decay_t< Types > >... > require_any_vector_t
Require any of the types satisfy is_vector.
require_all_not_t< container_type_check_base< is_vector, value_type_t, TypeCheck, Check >... > require_all_not_vector_vt
Require none of the types satisfy is_vector.
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.
require_not_t< math::conjunction< is_eigen_row_vector< Row >, is_eigen_col_vector< Col > > > require_not_eigen_row_and_col_t
Require Row is not a row vector and Col is not a column vector.
require_not_t< math::conjunction< is_row_vector< Row >, is_col_vector< Col > > > require_not_row_and_col_vector_t
Require Row is not a row vector and Col is not a column vector.
require_t< math::conjunction< is_eigen_row_vector< Row >, is_eigen_col_vector< Col > > > require_eigen_row_and_col_t
Require Row is a row vector and Col is a column vector.
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...
require_t< math::conjunction< is_row_vector< Row >, is_col_vector< Col > > > require_row_and_col_vector_t
Require Row is a row vector and Col is a column vector.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Underlying implementation for detecting if a Matrix is a column vector.
Underlying implementation for detecting if an Eigen Matrix is a column vector.
Underlying implementation for detecting if an Eigen Matrix is a row vector.
Underlying implementation for detecting if a Matrix is a row vector.
This underlying implementation is used when the type is not an std vector.
If the input type T has a static comple time constant type ColsAtCompileTime equal to 1 this has a st...
If the input type T is an eigen matrix with 1 row at compile time this has a static member with a val...
If the input type T is an eigen matrix with 1 column at compile time this has a static member with a ...
If the input type T is an eigen matrix with 1 column or 1 row at compile time this has a static membe...
Check if type derives from EigenBase
If the input type T has a static comple time constant type RowsAtCompileTime equal to 1 this has a st...
Base implementation for checking if type is std vector.
Defines a static member named value which is defined to be false as the primitive scalar types cannot...
If the input type T is either an eigen matrix with 1 column or 1 row at compile time or a standard ve...
Extends std::true_type when instantiated with zero or more template parameters, all of which extend t...
scalar_type_t< typename std::decay_t< T >::value_type > type
Metaprogram structure to determine the base scalar type of a template argument.
typename std::decay_t< T >::value_type type
Primary template class for metaprogram to compute the type of values stored in a container.