KerMor  0.9
Model order reduction for nonlinear dynamical systems and nonlinear approximation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
test_eval.cpp
Go to the documentation of this file.
1 #include "kermorpp.h"
2 
3 using namespace kermorpp;
4 using namespace std;
5 using namespace Eigen;
6 
7 int main() {
9 
10  int out = rand() % 200;
11  int cdim = rand() % 200;
12  int nc = rand() % 200;
13  int np = rand() % 200;
14 
15  k->coeffs = MatrixXd.Random(out, nc);
16  k->centers = MatrixXd.Random(cdim, nc);;
17  MatrixXd p = MatrixXd.Random(cdim, np);
18 
19  int rcode = 0;
20  k->kernel = new Gaussian(1);
21  MatrixXd res = k->evaluate(p);
22 
23  if (res.rows() != out) rcode--;
24 
25  k->kernel = new Wendland(10,1,1);
26  res = k->evaluate(p);
27 
28  if (res.rows() != out) rcode--;
29 
30  k->kernel = new Wendland(12,2,1);
31  res = k->evaluate(p);
32 
33  if (res.rows() != out) rcode--;
34 
35  k->kernel = new Wendland(13,3,1);
36  res = k->evaluate(p);
37 
38  if (res.rows() != out) rcode--;
39 
40  return rcode;
41 }
42 
MatrixXd evaluate(MatrixXd points)
int main()
Definition: test_eval.cpp:7
RBFKernel * kernel
Definition: kermorpp.h:64