1 #ifndef STAN_MATH_PRIM_MAT_FUN_POSITIVE_ORDERED_FREE_HPP 2 #define STAN_MATH_PRIM_MAT_FUN_POSITIVE_ORDERED_FREE_HPP 25 Eigen::Matrix<T, Eigen::Dynamic, 1>
33 "Positive ordered variable",
35 size_type k = y.size();
36 Matrix<T, Dynamic, 1> x(k);
40 for (size_type i = 1; i < k; ++i)
41 x[i] =
log(y[i] - y[i-1]);
Eigen::Matrix< T, Eigen::Dynamic, 1 > positive_ordered_free(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &y)
Return the vector of unconstrained scalars that transform to the specified positive ordered vector...
fvar< T > log(const fvar< T > &x)
void check_positive_ordered(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, 1 > &y)
Check if the specified vector contains non-negative values and is sorted into strictly increasing ord...
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic >::Index size_type
Type for sizes and indexes in an Eigen matrix with double e.
Primary template class for the metaprogram to compute the index type of a container.