Stan Math Library
4.9.0
Automatic Differentiation
Loading...
Searching...
No Matches
scalar_type.hpp
Go to the documentation of this file.
1
#ifndef STAN_MATH_PRIM_META_SCALAR_TYPE_HPP
2
#define STAN_MATH_PRIM_META_SCALAR_TYPE_HPP
3
4
#include <
stan/math/prim/fun/Eigen.hpp
>
5
#include <
stan/math/prim/meta/require_helpers.hpp
>
6
#include <type_traits>
7
#include <vector>
8
9
namespace
stan
{
10
19
template
<
typename
T,
typename
=
void
>
20
struct
scalar_type
{
21
using
type
= std::decay_t<T>;
22
};
23
24
template
<
typename
T>
25
using
scalar_type_t
=
typename
scalar_type<T>::type
;
26
27
}
// namespace stan
28
#endif
Eigen.hpp
stan::scalar_type_t
typename scalar_type< T >::type scalar_type_t
Definition
scalar_type.hpp:25
stan
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Definition
unit_vector_constrain.hpp:15
require_helpers.hpp
stan::scalar_type::type
std::decay_t< T > type
Definition
scalar_type.hpp:21
stan::scalar_type
Metaprogram structure to determine the base scalar type of a template argument.
Definition
scalar_type.hpp:20
stan
math
prim
meta
scalar_type.hpp
[
Stan Home Page
]
© 2011–2019, Stan Development Team.