| Stan Math Library 2.6.3 probability, sampling & optimization

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

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
4 #include <stan/math/prim/mat/fun/Eigen.hpp>
5 #include <stan/math/prim/mat/fun/typedefs.hpp>
6 #include <stan/math/prim/mat/err/check_vector.hpp>
7 #include <stan/math/fwd/core.hpp>
8 #include <stan/math/fwd/mat/fun/dot_product.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
core.hpp
stan::math::check_vector
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.
Definition: check_vector.hpp:34
stan::math::dot_self
fvar< T > dot_self(const Eigen::Matrix< fvar< T >, R, C > &v)
Definition: dot_self.hpp:16
dot_product.hpp
stan::math::dot_product
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
Eigen.hpp
check_vector.hpp
stan::math::fvar
Definition: fvar.hpp:13
typedefs.hpp

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