1 #ifndef STAN_MATH_ARR_SCAL_FUN_INVERSE_SOFTMAX_HPP
2 #define STAN_MATH_ARR_SCAL_FUN_INVERSE_SOFTMAX_HPP
33 template <
typename Vector>
39 for (
size_t i = 0; i < simplex.size(); ++i)
40 y[i] =
log(simplex[i]);
void inverse_softmax(const Vector &simplex, Vector &y)
Writes the inverse softmax of the simplex argument into the second argument.
fvar< T > log(const fvar< T > &x)
bool check_matching_sizes(const char *function, const char *name1, const T_y1 &y1, const char *name2, const T_y2 &y2)
Return true if two structures at the same size.