Automatic Differentiation
 
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches

◆ stochastic_column_constrain() [5/7]

template<bool Jacobian, typename Mat , typename Lp , require_convertible_t< return_type_t< Mat >, Lp > * = nullptr>
plain_type_t< Mat > stan::math::stochastic_column_constrain ( const Mat &  y,
Lp &  lp 
)
inline

Return a column 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, or a standard vector thereof
LpA scalar type for the lp argument. The scalar type of Mat should be convertable to this.
Parameters
yFree Matrix input of dimensionality (K - 1, M).
[in,out]lplog density accumulator
Returns
Matrix with simplex columns of dimensionality (K, M).

Definition at line 123 of file stochastic_column_constrain.hpp.