Stan Math Library  2.6.3
probability, sampling & optimization
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros
dot_self.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_MAT_FUN_DOT_SELF_HPP
2 #define STAN_MATH_FWD_MAT_FUN_DOT_SELF_HPP
3 
7 #include <stan/math/fwd/core.hpp>
9 #include <vector>
10 
11 namespace stan {
12  namespace math {
13 
14  template<typename T, int R, int C>
15  inline fvar<T>
16  dot_self(const Eigen::Matrix<fvar<T>, R, C>& v) {
17  stan::math::check_vector("dot_self",
18  "v", v);
19  return dot_product(v, v);
20  }
21  }
22 }
23 #endif
bool check_vector(const char *function, const char *name, const Eigen::Matrix< T, R, C > &x)
Return true if the matrix is either a row vector or column vector.
fvar< T > dot_self(const Eigen::Matrix< fvar< T >, R, C > &v)
Definition: dot_self.hpp:16
fvar< T > dot_product(const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2)
Definition: dot_product.hpp:20

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