forked from mblum/libgp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcov_matern5_iso.h
34 lines (29 loc) · 894 Bytes
/
cov_matern5_iso.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// libgp - Gaussian process library for Machine Learning
// Copyright (c) 2013, Manuel Blum <[email protected]>
// All rights reserved.
#ifndef __COV_MATERN5_ISO_H__
#define __COV_MATERN5_ISO_H__
#include "cov.h"
namespace libgp
{
/** Matern covariance function with \f$\nu = \frac{5}{2}\f$ and isotropic distance measure.
* @ingroup cov_group
* @author Manuel Blum
*/
class CovMatern5iso : public CovarianceFunction
{
public:
CovMatern5iso ();
virtual ~CovMatern5iso ();
bool init(int n);
double get(const Eigen::VectorXd &x1, const Eigen::VectorXd &x2);
void grad(const Eigen::VectorXd &x1, const Eigen::VectorXd &x2, Eigen::VectorXd &grad);
void set_loghyper(const Eigen::VectorXd &p);
virtual std::string to_string();
private:
double ell;
double sf2;
double sqrt5;
};
}
#endif /* __COV_MATERN5_ISO_H__ */