Stan  2.5.0
probability, sampling & optimization
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
dot_self.hpp
Go to the documentation of this file.
1 #ifndef STAN__MATH__MATRIX__DOT_SELF_HPP
2 #define STAN__MATH__MATRIX__DOT_SELF_HPP
3 
6 
7 namespace stan {
8  namespace math {
9 
17  template <int R, int C>
18  inline double dot_self(const Eigen::Matrix<double, R, C>& v) {
19  stan::math::check_vector("dot_self(%1%)",v,"v",(double*)0);
20  return v.squaredNorm();
21  }
22 
23  }
24 }
25 #endif
double dot_self(const std::vector< double > &x)
Definition: dot_self.hpp:11
bool check_vector(const char *function, const Eigen::Matrix< T, R, C > &x, const char *name, T_result *result)

     [ Stan Home Page ] © 2011–2014, Stan Development Team.