Stan
1.3
probability, sampling & optimization
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerator
Friends
Macros
Pages
src
stan
math
matrix
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
4
#include <
stan/math/matrix/Eigen.hpp
>
5
#include <
stan/math/matrix/validate_vector.hpp
>
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
validate_vector
(v,
"dot_self"
);
20
return
v.squaredNorm();
21
}
22
23
}
24
}
25
#endif
[
Stan Home Page
]
© 2011–2013, Stan Development Team.