-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsdf.cpp
More file actions
35 lines (29 loc) · 1.25 KB
/
Copy pathsdf.cpp
File metadata and controls
35 lines (29 loc) · 1.25 KB
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
35
#include <cmath>
#include <iostream>
#include <iomanip>
#include "types/meteor.h"
#include "types/dataset.h"
#include "metric/metric.h"
#include "kde/matrix.h"
#include "kde/bwms.h"
#include "kde/kernel/kernels.h"
int main() {
std::vector<TwoD<double>> data = {{0, 0}};
Euclidean2Dd metric;
CartesianMesh2D<double, VPImplicitTree> mesh(metric, MeshLimits<double>(-1.1, 1.1, 1000), MeshLimits<double>(-1.1, 1.1, 1000));
VPImplicitTree<TwoD<double>, double> vpitree(metric, data);
QuarticKernel kernel;
Dataset<TwoD<double>> dataset(data);
BandwidthMatrixConstantSelector<TwoD<double>, double> sel_s({{0.5, 0}, {0, 0.5}});
BandwidthMatrixConstantSelector<TwoD<double>, double> sel_d({{0.7, 0}, {0, 0.3}});
BandwidthMatrixConstantSelector<TwoD<double>, double> sel_f({{0.6, -0.3}, {-0.3, 0.4}});
BandwidthMatrixConstantSelector<TwoD<double>, double> sel_f2({{0.7, 0.2}, {0.2, -0.06}});
dataset.kde_corr(metric, mesh, sel_s, kernel);
mesh.write_values("out/s.bin");
dataset.kde_corr(metric, mesh, sel_d, kernel);
mesh.write_values("out/d.bin");
dataset.kde_corr(metric, mesh, sel_f, kernel);
mesh.write_values("out/f.bin");
dataset.kde_corr(metric, mesh, sel_f2, kernel);
mesh.write_values("out/f2.bin");
}