Automatic Differentiation
 
Loading...
Searching...
No Matches
initialize_fill.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_REV_FUN_INITIALIZE_FILL_HPP
2#define STAN_MATH_REV_FUN_INITIALIZE_FILL_HPP
3
8#include <vector>
9
10namespace stan {
11namespace math {
12
25template <typename VarMat, typename S, require_var_matrix_t<VarMat>* = nullptr,
26 require_stan_scalar_t<S>* = nullptr>
27inline void initialize_fill(VarMat& x, const S& y) {
28 x.vi_->val_.fill(value_of(y));
29}
30
31} // namespace math
32} // namespace stan
33
34#endif
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition value_of.hpp:18
void initialize_fill(EigMat &x, const S &y)
Fill the specified container with the specified value.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...