forked from mblum/libgp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcov_prod.h
34 lines (29 loc) · 924 Bytes
/
cov_prod.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_PROD_H__
#define __COV_PROD_H__
#include "cov.h"
namespace libgp
{
/** Sums of covariance functions.
* @author Manuel Blum
* @ingroup cov_group */
class CovProd : public CovarianceFunction
{
public:
CovProd ();
virtual ~CovProd ();
bool init(int n, CovarianceFunction * first, CovarianceFunction * second);
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:
size_t param_dim_first;
size_t param_dim_second;
CovarianceFunction * first;
CovarianceFunction * second;
};
}
#endif /* __COV_PROD_H__ */