Added header files
This commit is contained in:
parent
597b4a3f7f
commit
bc0bd5ece3
19
include/gp.h
Normal file
19
include/gp.h
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
#include <gsl/gsl_matrix.h>
|
||||||
|
|
||||||
|
#include "kernels.h"
|
||||||
|
#include "solve.h"
|
||||||
|
|
||||||
|
#ifndef GP_H
|
||||||
|
#define GP_H
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
gsl_matrix *meanf;
|
||||||
|
gsl_matrix *covf;
|
||||||
|
} gp_model;
|
||||||
|
|
||||||
|
gp_model
|
||||||
|
gpfit
|
||||||
|
( gsl_matrix *x, gsl_matrix *y, gsl_matrix *xs, kernel_info info, double noise,
|
||||||
|
invert_t inv_t );
|
||||||
|
|
||||||
|
#endif // !GP_H
|
||||||
21
include/kernels.h
Normal file
21
include/kernels.h
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
#include <gsl/gsl_matrix.h>
|
||||||
|
|
||||||
|
#ifndef KERNELS_H
|
||||||
|
#define KERNELS_H
|
||||||
|
typedef int(*kernel)(double, double, gsl_matrix* , gsl_matrix*, gsl_matrix*);
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
kernel kern;
|
||||||
|
double sigmaf;
|
||||||
|
double length_scale;
|
||||||
|
} kernel_info;
|
||||||
|
|
||||||
|
int
|
||||||
|
squared_exp
|
||||||
|
( double sigmaf, double ell, gsl_matrix *A, gsl_matrix *B, gsl_matrix *result );
|
||||||
|
|
||||||
|
int
|
||||||
|
matern32
|
||||||
|
( double sigmaf, double ell, gsl_matrix *A, gsl_matrix *B, gsl_matrix *result );
|
||||||
|
|
||||||
|
#endif // !KERNELS_H
|
||||||
16
include/solve.h
Normal file
16
include/solve.h
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
#include <gsl/gsl_matrix.h>
|
||||||
|
|
||||||
|
#ifndef SOLVE_H
|
||||||
|
#define SOLVE_H
|
||||||
|
|
||||||
|
typedef int (*invert_t)(gsl_matrix*, gsl_matrix*);
|
||||||
|
|
||||||
|
int
|
||||||
|
inv_lu
|
||||||
|
( gsl_matrix *A, gsl_matrix *inverse );
|
||||||
|
|
||||||
|
int
|
||||||
|
inv_chol
|
||||||
|
( gsl_matrix *A, gsl_matrix *inverse );
|
||||||
|
|
||||||
|
#endif // !SOLVE_H
|
||||||
Loading…
Reference in New Issue
Block a user