Automatic Differentiation
 
Loading...
Searching...
No Matches
cov_exp_quad.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_PRIM_FUN_COV_EXP_QUAD_HPP
2#define STAN_MATH_PRIM_FUN_COV_EXP_QUAD_HPP
3
8#include <vector>
9#include <cmath>
10
11namespace stan {
12namespace math {
13
17template <typename T_x, typename T_sigma, typename T_l>
18inline typename Eigen::Matrix<return_type_t<T_x, T_sigma, T_l>, Eigen::Dynamic,
19 Eigen::Dynamic>
20cov_exp_quad(const std::vector<T_x>& x, const T_sigma& sigma,
21 const T_l& length_scale) {
22 return gp_exp_quad_cov(x, sigma, length_scale);
23}
24
28template <typename T_x, typename T_sigma, typename T_l>
29inline typename Eigen::Matrix<return_type_t<T_x, T_sigma, T_l>, Eigen::Dynamic,
30 Eigen::Dynamic>
31cov_exp_quad(const std::vector<T_x>& x, const T_sigma& sigma,
32 const std::vector<T_l>& length_scale) {
33 return gp_exp_quad_cov(x, sigma, length_scale);
34}
35
39template <typename T_x1, typename T_x2, typename T_sigma, typename T_l>
40inline typename Eigen::Matrix<return_type_t<T_x1, T_x2, T_sigma, T_l>,
41 Eigen::Dynamic, Eigen::Dynamic>
42cov_exp_quad(const std::vector<T_x1>& x1, const std::vector<T_x2>& x2,
43 const T_sigma& sigma, const T_l& length_scale) {
44 return gp_exp_quad_cov(x1, x2, sigma, length_scale);
45}
46
50template <typename T_x1, typename T_x2, typename T_sigma, typename T_l>
51inline typename Eigen::Matrix<return_type_t<T_x1, T_x2, T_sigma, T_l>,
52 Eigen::Dynamic, Eigen::Dynamic>
53cov_exp_quad(const std::vector<T_x1>& x1, const std::vector<T_x2>& x2,
54 const T_sigma& sigma, const std::vector<T_l>& length_scale) {
55 return gp_exp_quad_cov(x1, x2, sigma, length_scale);
56}
57} // namespace math
58} // namespace stan
59#endif
matrix_cl< return_type_t< T1, T2, T3 > > gp_exp_quad_cov(const matrix_cl< T1 > &x, const T2 sigma, const T3 length_scale)
Squared exponential kernel on the GPU.
Eigen::Matrix< return_type_t< T_x, T_sigma, T_l >, Eigen::Dynamic, Eigen::Dynamic > cov_exp_quad(const std::vector< T_x > &x, const T_sigma &sigma, const T_l &length_scale)
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...