Comments (3)
And also when I looked inside the constructor for mat_index
I saw that we have a call to index->buildIndex();
so why do we have to explicitly call this again in the next line:
my_kd_tree_t mat_index(dim /*dim*/, samples, 10 /* max leaf */ ); // This already calls `index->buildIndex()`
mat_index.index->buildIndex();
from nanoflann.
But When using 1e7 samples which is 10 times larger, the tree takes a LOT more time to build and also to index.
No, I think you didn't do anything wrong. But you might have hit a performance limit related to the size of your L3 cache memory.
However, I would not recommend the vector_of_vector container for very large datasets, since it involves N
calls to the memory allocator (once per vector). Instead, use the Matrix adaptor or even better write your own wrapper to avoid data duplication, directly accessing to data in whatever form it's originally kept in your program.
And also when I looked inside the constructor for mat_index I saw that we
have a call to index->buildIndex(); so why do we have to explicitly call this again in the next line:
Good point. Please, feel free of opening a pull request to fix the code/example. I guess that keeping the call inside the ctor is the expected behavior by the user, so the second one is the one that needs to be removed.
from nanoflann.
PS: An efficient kind of Matrix for this case is not Eigen::MatrixXd, but a matrix with one dimension (e.g. number of cols) fixed in compile-time to 128 or whatever is the feature length.
from nanoflann.
Related Issues (20)
- Radius search for dynamic adaptor HOT 1
- Request for Support with Copy and Move Semantics for KDTree in nanoflann Library HOT 1
- Support KNN search within radius HOT 2
- Performance issues with RKNNResultSet HOT 2
- What't the the meaning of function accum_dist?
- the Strange code in middleSplit_()
- In debug mode, knnsearch will trigger _CONTAINER_DEBUG_LEVEL HOT 5
- What is correct implementation in order to query farthest(not closest) point?
- Version wasn't bumped since 1.5.1 HOT 1
- vcpkg
- KDTreeEigenMatrixAdaptor Build Index Issue after the Update 1.5.0 HOT 1
- How to add new distance metrics?
- When the number of point clouds is more than 400K,why does my code slow down?
- parallel query ? HOT 4
- Ordered indices returned from radius searches?
- rknnSearch input arg radius or radius squared?
- E: Unable to locate package libnanoflann-dev HOT 1
- Fastest Way to radiusSearch a Vector of Query Points
- use node index access instead of pointers
- findNeighbors does not sort results HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nanoflann.