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

◆ unit_vector_constrain() [3/11]

template<typename T_x , require_all_kernel_expressions_and_none_scalar_t< T_x > * = nullptr>
auto stan::math::unit_vector_constrain ( T_x &&  x)
inline

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

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

Template Parameters
T_xtype of the vector
Parameters
xvector of unrestricted variables
Returns
Unit length vector

Definition at line 24 of file unit_vector_constrain.hpp.