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__AGRAD__FWD__MATRIX__DOT_SELF_HPP
2 #define STAN__AGRAD__FWD__MATRIX__DOT_SELF_HPP
3 
4 #include <vector>
10 
11 namespace stan {
12  namespace agrad {
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(%1%)",v,"v",(double*)0);
18  return dot_product(v, v);
19  }
20  }
21 }
22 #endif
fvar< T > dot_self(const Eigen::Matrix< fvar< T >, R, C > &v)
Definition: dot_self.hpp:16
bool check_vector(const char *function, const Eigen::Matrix< T, R, C > &x, const char *name, T_result *result)
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–2014, Stan Development Team.