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
7#include <vector>
8
9namespace stan {
10namespace math {
11
24template <typename VarMat, typename S, require_var_matrix_t<VarMat>* = nullptr,
25 require_stan_scalar_t<S>* = nullptr>
26inline void initialize_fill(VarMat& x, const S& y) {
27 x.vi_->val_.fill(value_of(y));
28}
29
30} // namespace math
31} // namespace stan
32
33#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 ...