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

◆ positive_ordered_constrain() [3/5]

template<bool Jacobian, typename Vec , require_not_std_vector_t< Vec > * = nullptr>
auto stan::math::positive_ordered_constrain ( const Vec &  x,
return_type_t< Vec > &  lp 
)
inline

Return a positive valued, increasing positive ordered vector derived from the specified free vector.

The returned constrained vector will have the same dimensionality as the specified free vector. 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
VecA type inheriting from Eigen::EigenBase, a var_value with inner type inheriting from Eigen::EigenBase
Parameters
xFree vector of scalars
[in,out]lplog density accumulato
Returns
Positive, increasing ordered vector

Definition at line 76 of file positive_ordered_constrain.hpp.