We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If you create a KDTreeSingleIndex with no data, it will segfault when you call buildIndex().
This assumes that you create the dataset matrix with the number of columns that it would have IF there were data, but with zero rows.
Minimal example:
// empty dataset, with 3 columns if there were data. Matrix dataset(NULL, 0, 3); KDTreeSingleIndex< L2 > index(dataset); index.buildIndex();
This also happens for findNeighbors() due to computeInitialDistances() segfault.
I would suggest either assert()ing that there is data, or doing an if (empty) return; or similar.
thanks again, Paul
The text was updated successfully, but these errors were encountered:
No branches or pull requests
If you create a KDTreeSingleIndex with no data, it will segfault when you call buildIndex().
This assumes that you create the dataset matrix with the number of columns that it would have IF there were data,
but with zero rows.
Minimal example:
// empty dataset, with 3 columns if there were data.
Matrix dataset(NULL, 0, 3);
KDTreeSingleIndex< L2 > index(dataset);
index.buildIndex();
This also happens for findNeighbors() due to computeInitialDistances() segfault.
I would suggest either assert()ing that there is data, or doing an if (empty) return; or similar.
thanks again,
Paul
The text was updated successfully, but these errors were encountered: