Stan Math Library
2.14.0
reverse mode automatic differentiation
stan
math
fwd
mat
fun
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
check_vector
(
"dot_self"
,
"v"
, v);
18
return
dot_product
(v, v);
19
}
20
21
}
22
}
23
#endif
core.hpp
stan
Definition:
log_sum_exp.hpp:8
stan::math::check_vector
void check_vector(const char *function, const char *name, const Eigen::Matrix< T, R, C > &x)
Check if the matrix is either a row vector or column vector.
Definition:
check_vector.hpp:32
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:18
Eigen.hpp
check_vector.hpp
stan::math::fvar
Definition:
fvar.hpp:14
typedefs.hpp
[
Stan Home Page
]
© 2011–2016, Stan Development Team.