11 #include "../kermorpp.h"
15 using namespace kermorpp;
17 void mexFunction(
int nlhs, mxArray *plhs[],
int nrhs,
const mxArray *prhs[]) {
20 std.streambuf *outbuf = std.cout.rdbuf(&mout);
22 Matrix x = Matrix(mxGetM(prhs[0]),mxGetN(prhs[0]));
23 x.values = mxGetPr(prhs[0]);
25 Matrix y = Matrix(mxGetM(prhs[1]), mxGetN(prhs[1]));
26 y.values = mxGetPr(prhs[1]);
28 double gamma = mxGetScalar(prhs[2]);
38 plhs[0] = mxCreateDoubleMatrix(res.n, res.m, mxREAL);
39 double* mres = mxGetPr(plhs[0]);
40 for (
size_t i = 0; i < res.n * res.m; i++) {
41 mres[i] = res.values[i];
44 std.cout.rdbuf(outbuf);
MatrixXd evaluate(MatrixXd points)
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
static KernelExpansion * loadFrom(string dir)