Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ assign() [3/3]

template<typename T_lhs , typename T_rhs >
void stan::math::assign ( std::vector< T_lhs > &  x,
const std::vector< T_rhs > &  y 
)
inline

Copy the right-hand side's value to the left-hand side variable.

The assign() function is overloaded. This instance will be called for arguments that are both std::vector, and will call assign() element-by element.

For example, a std::vector<int> can be assigned to a std::vector<double> using this function.

Template Parameters
T_lhstype of elements in the left-hand side vector
T_rhstype of elements in the right-hand side vector
Parameters
xLeft-hand side vector.
yRight-hand side vector.
Exceptions
std::invalid_argumentif sizes do not match.

Definition at line 92 of file assign.hpp.