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

◆ simplex_constrain() [6/6]

template<typename T , require_rev_col_vector_t< T > * = nullptr>
auto stan::math::simplex_constrain ( const T &  y,
scalar_type_t< T > &  lp 
)

Return the simplex corresponding to the specified free vector and increment the specified log probability reference with the log absolute Jacobian determinant of the transform.

The simplex transform is defined through a centered stick-breaking process.

Template Parameters
Ttype of the vector to constrain
Parameters
yFree vector input of dimensionality N.
lpLog probability reference to increment.
Returns
Simplex of dimensionality N + 1.

Definition at line 85 of file simplex_constrain.hpp.