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
►
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
as_array_or_scalar.hpp
Go to the documentation of this file.
1
#ifndef STAN_MATH_REV_FUN_AS_ARRAY_OR_SCALAR_HPP
2
#define STAN_MATH_REV_FUN_AS_ARRAY_OR_SCALAR_HPP
3
4
#include <
stan/math/prim/fun/Eigen.hpp
>
5
#include <
stan/math/rev/meta.hpp
>
6
#include <
stan/math/rev/core.hpp
>
7
8
namespace
stan
{
9
namespace
math {
10
19
template
<
typename
T, require_var_matrix_t<T>* =
nullptr
>
20
inline
auto
as_array_or_scalar
(T&& v) {
21
return
v.array();
22
}
23
24
}
// namespace math
25
}
// namespace stan
26
27
#endif
Eigen.hpp
stan::math::as_array_or_scalar
T as_array_or_scalar(T &&v)
Returns specified input value.
Definition
as_array_or_scalar.hpp:19
stan
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Definition
unit_vector_constrain.hpp:15
core.hpp
meta.hpp
stan
math
rev
fun
as_array_or_scalar.hpp
[
Stan Home Page
]
© 2011–2019, Stan Development Team.