Commit c98a6e14 authored by Sabrina Templeton's avatar Sabrina Templeton
Browse files

works for up to 100k points, problem with a million

parent 7afa464f
......@@ -77,7 +77,7 @@ UT_TEST_CASE( test1 )
GL_CALL( glBindVertexArray(vertex_array) );
//generate random seeds desired times 3
int num_points = 100.;
int num_points = 100000.;
int size = num_points*3;
......@@ -144,7 +144,7 @@ UT_TEST_CASE( test1 )
nns->set_points( num_points , seeds_d.data() );
index_t nb_neighbors = index_t(num_points); // since there are only seven points right now, this number will probably be more like 50 later
index_t nb_neighbors = 50;//index_t(num_points); // since there are only seven points right now, this number will probably be more like 50 later
std::vector<index_t> neighbors(nb_neighbors);
std::vector<index_t> total_neighbors(nb_neighbors * num_points); // i don't know if this is the correct number if, for example, nb points and nb neighbors are not the same (which they usually will not be)
std::vector<double> neighbors_sq_dist(nb_neighbors);
......@@ -162,10 +162,11 @@ UT_TEST_CASE( test1 )
//here we need to resave the neighbors in a new full neighbors array before moving on
for (index_t j = 0; j < num_points; j++){
for (index_t j = 0; j < nb_neighbors; j++){
//total_neighbors[((k+1)*i)-1] = neighbors[i];
total_neighbors[i] = neighbors[j];
//std::cout << i << std::endl;
i++;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment