Loading [MathJax]/extensions/TeX/AMSsymbols.js
Automatic Differentiation
 
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches

◆ positive_ordered_constrain() [2/4]

template<typename Vec , typename Lp , require_col_vector_t< Vec > * = nullptr, require_convertible_t< return_type_t< Vec >, Lp > * = nullptr>
auto stan::math::positive_ordered_constrain ( const Vec &  x,
Lp &  lp 
)
inline

Return a positive valued, increasing positive ordered vector derived from the specified free vector and increment the specified log probability reference with the log absolute Jacobian determinant of the transform.

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.

Template Parameters
Vectype of the vector
LpA scalar type for the lp argument. The scalar type of Vec should be convertable to this.
Parameters
xFree vector of scalars.
lpLog probability reference.
Returns
Positive, increasing ordered 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, or a vector thereof
LpA scalar type for the lp argument. The scalar type of Vec should be convertable to this.
Parameters
xFree vector of scalars
[in,out]lplog density accumulato
Returns
Positive, increasing ordered vector

Definition at line 56 of file positive_ordered_constrain.hpp.