Loading [MathJax]/extensions/TeX/AMSsymbols.js
Automatic Differentiation
 
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 
)
inline

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 using the inverse of the isometric log ratio (ILR) transform. This is equivalent to softmax(sum_to_zero_constrain(y)).

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 71 of file simplex_constrain.hpp.