![]() |
Stan Math Library
2.20.0
reverse mode automatic differentiation
|
#include <simplex_constrain.hpp>
Public Member Functions | |
template<std::size_t size> | |
Eigen::VectorXd | operator() (const std::array< bool, size > &needs_adj, const Eigen::VectorXd &y) |
Return the simplex corresponding to the specified free vector. More... | |
template<std::size_t size> | |
auto | multiply_adjoint_jacobian (const std::array< bool, size > &needs_adj, const Eigen::VectorXd &adj) const |
Definition at line 15 of file simplex_constrain.hpp.
|
inline |
Definition at line 66 of file simplex_constrain.hpp.
|
inline |
Return the simplex corresponding to the specified free vector.
A simplex is a vector containing values greater than or equal to 0 that sum to 1. A vector with (K-1) unconstrained values will produce a simplex of size K.
The transform is based on a centered stick-breaking process.
size | Number of adjoints to return |
needs_adj | Boolean indicators of if adjoints of arguments will be needed |
y | Free vector input of dimensionality K - 1 |
Definition at line 36 of file simplex_constrain.hpp.