1#ifndef STAN_MATH_PRIM_CONSTRAINT_OFFSET_MULTIPLIER_FREE_HPP
2#define STAN_MATH_PRIM_CONSTRAINT_OFFSET_MULTIPLIER_FREE_HPP
41template <
typename T,
typename M,
typename S>
43 auto&& mu_ref =
to_ref(mu);
44 auto&& sigma_ref =
to_ref(sigma);
64template <
typename T,
typename M,
typename S,
70 ret.reserve(x.size());
71 const auto& mu_ref =
to_ref(mu);
72 const auto& sigma_ref =
to_ref(sigma);
73 for (
size_t i = 0; i < x.size(); ++i) {
82template <
typename T,
typename M,
typename S,
85 const std::vector<S>& sigma) {
90 ret.reserve(x.size());
91 const auto& mu_ref =
to_ref(mu);
92 for (
size_t i = 0; i < x.size(); ++i) {
101template <
typename T,
typename M,
typename S,
104 const std::vector<M>& mu,
const S& sigma) {
109 ret.reserve(x.size());
110 const auto& sigma_ref =
to_ref(sigma);
111 for (
size_t i = 0; i < x.size(); ++i) {
120template <
typename T,
typename M,
typename S>
122 const std::vector<M>& mu,
123 const std::vector<S>& sigma) {
129 ret.reserve(x.size());
130 for (
size_t i = 0; i < x.size(); ++i) {
subtraction_< as_operation_cl_t< T_a >, as_operation_cl_t< T_b > > subtract(T_a &&a, T_b &&b)
auto divide(T_a &&a, double d)
Returns the elementwise division of the kernel generator expression.
require_not_t< is_std_vector< std::decay_t< T > > > require_not_std_vector_t
Require type does not satisfy is_std_vector.
require_all_not_t< is_std_vector< std::decay_t< Types > >... > require_all_not_std_vector_t
Require none of the types satisfy is_std_vector.
T value_of(const fvar< T > &v)
Return the value of the specified variable.
auto offset_multiplier_free(const T &y, const M &mu, const S &sigma)
Return the unconstrained variable that transforms to the specified offset and multiplier constrained ...
void check_matching_dims(const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
Check if the two containers have the same dimensions.
ref_type_t< T && > to_ref(T &&a)
This evaluates expensive Eigen expressions.
void check_finite(const char *function, const char *name, const T_y &y)
Return true if all values in y are finite.
void check_positive_finite(const char *function, const char *name, const T_y &y)
Check if y is positive and finite.
typename plain_type< T >::type plain_type_t
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Check if a type is derived from Eigen::EigenBase or is a var_value whose value_type is derived from E...