31 Base(x.data(), x.size()) { }
34 operator std::vector<Type>()
const {
35 std::vector<Type> x(this->size());
36 for (
size_t i=0; i<this->size(); i++)
42 for (
size_t i=0; i<this->size(); i++)
50 return TMBad::sum(*
this);
62 template<
class Type,
class T1,
class T2>
67 logres = -log(Type(sqrt(2*M_PI)) * sd) - Type(.5) * x * x;
68 if(give_log)
return logres;
69 else return exp(logres);
Contiguous set of variables on the current tape.
Vector of consequtive values on the AD tape.
vector< Type > dnorm(vector< Type > x, T1 mean, T2 sd, int give_log=0)
Demonstrate native vectorization of 'dnorm'.
Vectorized atomic functions.
Vector class used by TMB.