Dear all,
I had tried to implement KDTree in step_1 tutoria and header file for kdtree is added to the codel. It is as follows:
void first_grid()
{
Triangulation<2> triangulation;
GridGenerator::hyper_cube(triangulation);
triangulation.refine_global(4);
Point<2> p;
KDTree<2> tree(10,triangulation.get_vertices());
auto w = tree.get_closest_points(p, 3);
std::ofstream out("grid-1.svg");
GridOut grid_out;
grid_out.write_svg(triangulation, out);
std::cout << "Grid written to grid-1.svg" << std::endl;
}
It gives me error as below
/home/heena/Project/examples/step-1/step-1.cc:76:4: error: ‘KDTree’ was not declared in this scope
KDTree<2> tree(10,triangulation.get_vertices());
^~~~~~
/home/heena/Project/examples/step-1/step-1.cc:76:4: note: suggested alternative: ‘free’
KDTree<2> tree(10,triangulation.get_vertices());
^~~~~~
free
/home/heena/Project/examples/step-1/step-1.cc:76:14: error: ‘tree’ was not declared in this scope
KDTree<2> tree(10,triangulation.get_vertices());
^~~~
/home/heena/Project/examples/step-1/step-1.cc:76:14: note: suggested alternative: ‘free’
KDTree<2> tree(10,triangulation.get_vertices());
^~~~
free
Is there something missing?
Regards,
Heena