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
eigenvectors_sym.hpp
Go to the documentation of this file.
1
#ifndef __STAN__MATH__MATRIX__EIGENVECTORS_SYM_HPP__
2
#define __STAN__MATH__MATRIX__EIGENVECTORS_SYM_HPP__
3
4
#include <
stan/math/matrix/Eigen.hpp
>
5
#include <
stan/math/matrix/validate_nonzero_size.hpp
>
6
#include <
stan/math/matrix/validate_symmetric.hpp
>
7
8
namespace
stan {
9
namespace
math {
10
11
template
<
typename
T>
12
Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic>
13
eigenvectors_sym
(
const
Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic>& m) {
14
validate_nonzero_size
(m,
"eigenvectors_sym"
);
15
validate_symmetric
(m,
"eigenvectors_sym"
);
16
Eigen::SelfAdjointEigenSolver<Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic> >
17
solver(m);
18
return
solver.eigenvectors();
19
}
20
21
}
22
}
23
#endif
[
Stan Home Page
]
© 2011–2013, Stan Development Team.