Loading [MathJax]/extensions/TeX/AMSsymbols.js
Stan Math Library
5.0.0
Automatic Differentiation
▼
Stan Math Library
Overview
▼
Contributor Guides
Developer Guide
Adding New Functions
Adding New Distributions
Common Pitfalls
Using requires for general overloads
Reverse Mode Types
Testing Automatic Differentiation Functions
Testing New Distributions
Add New Functions With Known Gradients
Adding New OpenCL Functions
Windows Development Tips
▼
Internal Docs
►
Probability Distributions
►
OpenCL
►
Compressed Sparse Row matrix format.
►
Type Traits
►
Available requires<> for overloading.
►
Eigen expressions
►
arena_matrix <br>
►
real <br>
►
Parallelism
(External Link) Stan Language Docs
(External Link) Stan Discourse
►
Stan Math Library Docs
►
Class List
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
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.