1#ifndef STAN_MATH_PRIM_FUN_ASSIGN_HPP
2#define STAN_MATH_PRIM_FUN_ASSIGN_HPP
23 if (N == Eigen::Dynamic) {
24 o <<
"dynamically sized";
44template <
typename T_lhs,
typename T_rhs,
46inline void assign(T_lhs& x,
const T_rhs& y) {
65template <
typename T_lhs,
typename T_rhs,
67inline void assign(T_lhs&& x,
const T_rhs& y) {
69 x = y.template cast<value_type_t<T_lhs>>();
91template <
typename T_lhs,
typename T_rhs>
92inline void assign(std::vector<T_lhs>& x,
const std::vector<T_rhs>& y) {
94 for (
size_t i = 0; i < x.size(); ++i) {
require_all_t< is_eigen< std::decay_t< Types > >... > require_all_eigen_t
Require all of the types satisfy is_eigen.
require_all_t< is_stan_scalar< std::decay_t< Types > >... > require_all_stan_scalar_t
Require all of the types satisfy is_stan_scalar.
void assign(T_lhs &x, const T_rhs &y)
Copy the right-hand side's value to the left-hand side variable.
void check_matching_dims(const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
Check if the two containers have the same dimensions.
void check_matching_sizes(const char *function, const char *name1, const T_y1 &y1, const char *name2, const T_y2 &y2)
Check if two structures at the same size.
void print_mat_size(std::ostream &o)
Helper function to return the matrix size as either "dynamic" or "1".
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...