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

◆ stochastic_row_constrain() [3/6]

template<bool Jacobian, typename Mat , require_not_std_vector_t< Mat > * = nullptr>
plain_type_t< Mat > stan::math::stochastic_row_constrain ( const Mat &  y,
return_type_t< Mat > &  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
MatA 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 matrix
[in,out]lplog density accumulator
Returns
Matrix with simplexes along the rows of dimensionality (N, K).

Definition at line 93 of file stochastic_row_constrain.hpp.