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

◆ stochastic_row_constrain() [4/6]

template<bool Jacobian, typename T , require_std_vector_t< T > * = nullptr>
auto stan::math::stochastic_row_constrain ( const T &  y,
return_type_t< T > &  lp 
)
inline

Return a row stochastic matrix.

If the Jacobian parameter is true, the log density accumulator is incremented with the log absolute Jacobian determinant of the transform. All of the transforms are specified with their Jacobians in the Stan Reference Manual chapter Constraint Transforms.

Template Parameters
Jacobianif true, increment log density accumulator with log absolute Jacobian determinant of constraining transform
TA standard vector with inner type inheriting from Eigen::DenseBase or a var_value with inner type inheriting from Eigen::DenseBase with compile time dynamic rows and dynamic columns
Parameters
[in]yfree vector with matrices of size (N, K - 1)
[in,out]lplog density accumulator
Returns
vector of matrices with simplex rows of dimensionality (N, K)

Definition at line 119 of file stochastic_row_constrain.hpp.