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

◆ unit_vector_constrain() [7/11]

template<typename T , require_eigen_col_vector_t< T > * = nullptr, require_not_vt_autodiff< T > * = nullptr>
plain_type_t< T > stan::math::unit_vector_constrain ( const T &  y)
inline

Return the unit length vector corresponding to the free vector y.

See the Wikipedia page on generating random points on an N-sphere.

Template Parameters
Ttype inheriting from EigenBase that does not have an fvar scalar type.
Parameters
yvector of K unrestricted variables
Returns
Unit length vector of dimension K

Definition at line 27 of file unit_vector_constrain.hpp.