Stan Math Library
5.0.0
Automatic Differentiation
Loading...
Searching...
No Matches
◆
uniform_simplex()
auto stan::math::uniform_simplex
(
int
K
)
inline
Return a uniform simplex of size K.
Parameters
K
size 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_error
if K is not positive.
Definition at line
18
of file
uniform_simplex.hpp
.
stan
math
[
Stan Home Page
]
© 2011–2019, Stan Development Team.