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

◆ simplex_free() [1/2]

template<typename Vec , require_eigen_vector_t< Vec > * = nullptr>
plain_type_t< Vec > stan::math::simplex_free ( const Vec &  x)
inline

Return an unconstrained vector that when transformed produces the specified simplex.

It applies to a simplex of dimensionality K and produces an unconstrained vector of dimensionality (K-1).

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

Template Parameters
ColVectype of the simplex (must be a column vector)
Parameters
xSimplex of dimensionality K.
Returns
Free vector of dimensionality (K-1) that transforms to the simplex.
Exceptions
std::domain_errorif x is not a valid simplex

Definition at line 30 of file simplex_free.hpp.