Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ gp_matern32_cov() [3/6]

template<typename T_x , typename T_s , typename T_l >
Eigen::Matrix< return_type_t< T_x, T_s, T_l >, Eigen::Dynamic, Eigen::Dynamic > stan::math::gp_matern32_cov ( const std::vector< T_x > &  x,
const T_s &  sigma,
const T_l &  length_scale 
)
inline

Returns a Matern 3/2 covariance matrix.

\[ k(x, x') = \sigma^2(1 + \frac{\sqrt{3}d(x, x')}{l})exp(-\frac{\sqrt{3}d(x, x')}{l}) \]

where \( d(x, x') \) is the Euclidean distance.

Template Parameters
T_xtype for each scalar
T_stype of parameter of sigma
T_ltype of parameter length scale
Parameters
xstd::vector of scalars that can be used in squared distance
length_scalelength scale
sigmamarginal standard deviation or magnitude
Exceptions
std::domainerror if sigma <= 0, l <= 0, or x is nan or inf

Definition at line 39 of file gp_matern32_cov.hpp.