Automatic Differentiation
 
Loading...
Searching...
No Matches
as_value_array_or_scalar.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_PRIM_FUN_AS_VALUE_ARRAY_OR_SCALAR_HPP
2#define STAN_MATH_PRIM_FUN_AS_VALUE_ARRAY_OR_SCALAR_HPP
3
8#include <vector>
9
10namespace stan {
11namespace math {
12
20template <typename T>
21inline auto as_value_array_or_scalar(T&& v) {
22 return value_of(as_array_or_scalar(std::forward<T>(v)));
23}
24
25} // namespace math
26} // namespace stan
27
28#endif
T as_array_or_scalar(T &&v)
Returns specified input value.
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition value_of.hpp:18
auto as_value_array_or_scalar(T &&v)
Extract the value from an object.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Definition fvar.hpp:9