MCPcopy Create free account
hub / github.com/BoevaLab/FREEC / KernelVector

Method KernelVector

src/KernelVector.cpp:25–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23
24
25KernelVector::KernelVector(int r) {
26 radius_ = r;
27 std::vector<float> V(r);
28 sum_ = 0;
29 for (int i = 0; i<r; i++) {
30 V[i] = EpanechnikovKernel(float(i)/r);
31 //std::cout << i << " " << V[i]<< "\n";
32 sum_ += 2*V[i];
33 }
34 sum_ -= EpanechnikovKernel(0);
35 std::cout << sum_ << "\n";
36 vector_ = V;
37
38}
39
40float KernelVector::getK(int i , int j) {
41 int l = abs(i-j);

Callers

nothing calls this directly

Calls 1

EpanechnikovKernelFunction · 0.85

Tested by

no test coverage detected