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

◆ var_value() [4/7]

template<typename T >
template<typename S , require_not_assignable_t< vari_type, typename var_value< S >::vari_type > * = nullptr, require_constructible_t< vari_type, S > * = nullptr, require_all_plain_type_t< T, S > * = nullptr>
stan::math::var_value< T, internal::require_matrix_var_value< T > >::var_value ( const var_value< S > &  other)
inline

Construct from a var_value with different inner vari_type

Template Parameters
SAn eigen type that is not the same as T, but can be assigned to vari_value<T>.
Parameters
otherthe value to assign
Note
This constructor is for types such as vari_value<Matrix<double, -1, 1>> and vari_value<Matrix<double, 1, -1>>. As pointers those are not assignable to one another, but their inner matrix types are. So the var has to make a new vari and assign the inner matrices to that new vari.

Definition at line 397 of file var.hpp.