1#ifndef STAN_MATH_PRIM_CONSTRAINT_OFFSET_MULTIPLIER_FREE_HPP
2#define STAN_MATH_PRIM_CONSTRAINT_OFFSET_MULTIPLIER_FREE_HPP
42template <
typename T,
typename M,
typename S>
44 auto&& mu_ref =
to_ref(mu);
45 auto&& sigma_ref =
to_ref(sigma);
65template <
typename T,
typename M,
typename S,
71 ret.reserve(x.size());
72 const auto& mu_ref =
to_ref(mu);
73 const auto& sigma_ref =
to_ref(sigma);
74 for (
size_t i = 0; i < x.size(); ++i) {
83template <
typename T,
typename M,
typename S,
86 const std::vector<S>& sigma) {
91 ret.reserve(x.size());
92 const auto& mu_ref =
to_ref(mu);
93 for (
size_t i = 0; i < x.size(); ++i) {
102template <
typename T,
typename M,
typename S,
105 const std::vector<M>& mu,
const S& sigma) {
110 ret.reserve(x.size());
111 const auto& sigma_ref =
to_ref(sigma);
112 for (
size_t i = 0; i < x.size(); ++i) {
121template <
typename T,
typename M,
typename S>
123 const std::vector<M>& mu,
124 const std::vector<S>& sigma) {
130 ret.reserve(x.size());
131 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 eval(T &&arg)
Inputs which have a plain_type equal to the own time are forwarded unmodified (for Eigen expressions ...
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...