Stan Math Library  2.20.0
reverse mode automatic differentiation
Public Member Functions | List of all members
stan::math::internal::simplex_constrain_op Class Reference

#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
 

Detailed Description

Definition at line 15 of file simplex_constrain.hpp.

Member Function Documentation

◆ multiply_adjoint_jacobian()

template<std::size_t size>
auto stan::math::internal::simplex_constrain_op::multiply_adjoint_jacobian ( const std::array< bool, size > &  needs_adj,
const Eigen::VectorXd &  adj 
) const
inline

Definition at line 66 of file simplex_constrain.hpp.

◆ operator()()

template<std::size_t size>
Eigen::VectorXd stan::math::internal::simplex_constrain_op::operator() ( const std::array< bool, size > &  needs_adj,
const Eigen::VectorXd &  y 
)
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.

Template Parameters
sizeNumber of adjoints to return
Parameters
needs_adjBoolean indicators of if adjoints of arguments will be needed
yFree vector input of dimensionality K - 1
Returns
Simplex of dimensionality K

Definition at line 36 of file simplex_constrain.hpp.


The documentation for this class was generated from the following file:

     [ Stan Home Page ] © 2011–2018, Stan Development Team.