You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
KDTreeSingleIndexDynamicAdaptor(const int dimensionality, DatasetAdaptor& inputData, const KDTreeSingleIndexAdaptorParams& params = KDTreeSingleIndexAdaptorParams() , const size_t maximumPointCount = 1000000000U) :
dataset(inputData), index_params(params), distance(inputData)
{
if (dataset.kdtree_get_point_count()) throw std::runtime_error("[nanoflann] cannot handle non empty point cloud.");
treeCount = std::log2(maximumPointCount);
pointCount = 0U;
dim = dimensionality;
treeIndex.clear();
if (DIM > 0) dim = DIM;
m_leaf_max_size = params.leaf_max_size;
init();
}
Would there be anything wrong with removing the assertion and then adding a line: addPoints(0, dataset.kdtree_get_point_count() - 1);
right after init?
This seems more intuitive.
The text was updated successfully, but these errors were encountered:
jefesaurus
changed the title
Dynamic tree constructor can't handle empty cloud
Dynamic tree constructor can't handle non-empty cloud
Feb 15, 2018
Here's the existing constructor.
Would there be anything wrong with removing the assertion and then adding a line:
addPoints(0, dataset.kdtree_get_point_count() - 1);
right after init?
This seems more intuitive.
The text was updated successfully, but these errors were encountered: