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

◆ uniform_simplex()

auto stan::math::uniform_simplex ( int  K)
inline

Return a uniform simplex of size K.

Parameters
Ksize of the simplex
Returns
A vector of size K with all elements initialized to 1 / K, so that their sum is equal to 1.
Exceptions
std::domain_errorif K is not positive.

Definition at line 18 of file uniform_simplex.hpp.