Skip to content
New issue

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

KDTreeEigenMatrixAdaptor for the case when points of the state space are located in columns #37

Closed
AlekseyMuraviev opened this issue Mar 10, 2017 · 1 comment

Comments

@AlekseyMuraviev
Copy link

KDTreeEigenMatrixAdaptor works with data in which "Each row in the matrix represents a point in the state space", i.e. for three-dimensional points, the data should be stored in the Eigen::MatrixX3d.

In some cases, the points are conveniently stored in columns - in the Eigen::Matrix3Xd.
For example, here implemented an adapter for this case:

...
struct KDTreeAdaptor {
    ...
    KDTreeAdaptor(const MatrixType &mat, const int leaf_max_size = 10) : m_data_matrix(mat) {
        const size_t dims = mat.rows();
        ...

Can you add this option to the library?

@jlblancoc
Copy link
Owner

jlblancoc commented Mar 10, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants