All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Spatially-Dimension-Adaptive Refinement in C++

We refine adaptively 20 times

for (int step = 0; step < 20; step++) {

Now we need to calculate the surplus vector alpha. In data mining with do it by solving a regression problem as shown in example Classification Example. Here, the function can be evaluated at any point. Hence. we simply evaluate it at the coordinates of the grid points to obtain the nodal values. Then we use hierarchization to obtain the surplus value.

// set function values in alpha
DataVector gridPointCoordinates(dim);
for (size_t i = 0; i < gridStorage.getSize(); i++) {
alpha[i] = f(gridPointCoordinates[0], gridPointCoordinates[1]);