1#ifndef STAN_MATH_PRIM_FUN_DOT_SELF_HPP
2#define STAN_MATH_PRIM_FUN_DOT_SELF_HPP
13inline double dot_self(
const std::vector<double>& x) {
28template <
typename T, require_eigen_t<T>* =
nullptr,
29 require_not_eigen_vt<is_var, T>* =
nullptr>
31 return v.squaredNorm();
typename value_type< T >::type value_type_t
Helper function for accessing underlying type.
auto sum(const std::vector< T > &m)
Return the sum of the entries of the specified standard vector.
auto dot_self(const T &a)
Returns squared norm of a vector or matrix.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...