Stan
2.5.0
probability, sampling & optimization
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
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/error_handling/matrix/check_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
stan::math::check_vector
(
"dot_self(%1%)"
,v,
"v"
,(
double
*)0);
20
return
v.squaredNorm();
21
}
22
23
}
24
}
25
#endif
stan::math::dot_self
double dot_self(const std::vector< double > &x)
Definition:
dot_self.hpp:11
stan::math::check_vector
bool check_vector(const char *function, const Eigen::Matrix< T, R, C > &x, const char *name, T_result *result)
Definition:
check_vector.hpp:14
Eigen.hpp
check_vector.hpp
[
Stan Home Page
]
© 2011–2014, Stan Development Team.