OK. You want neighbors of a quadtree *cell*, such as the left neighbor of a quadtree cell, correct?

I have not interfaced this with MATLAB. However, please look at the source file:

'quadtree.cc'

and search for the class method:

'Locate_Left_Neighbor'

That is how you could do it from within C++. Interfacing it to MATLAB requires modifying 'mexQuadtree.cpp' and the corresponding MATLAB class.

I could expand the interface, but I cannot guarantee when that would happen. If you could give a few more details about what you want, that would be great.

For example, I assume you would want the UP, DOWN, LEFT, and RIGHT neighbors? The corner neighbors too?

What is so special about that number? Could I make up anything, as long as it is consistent in the C++ code?

The reason I ask is if I have two separate C++ classes that are mex-ed and interfaced using your approach. It seems I should use a different signature for each C++ class, for safety's sake. Is this true?

OK. You want neighbors of a quadtree *cell*, such as the left neighbor of a quadtree cell, correct?

I have not interfaced this with MATLAB. However, please look at the source file:

'quadtree.cc'

and search for the class method:

'Locate_Left_Neighbor'

That is how you could do it from within C++. Interfacing it to MATLAB requires modifying 'mexQuadtree.cpp' and the corresponding MATLAB class.

I could expand the interface, but I cannot guarantee when that would happen. If you could give a few more details about what you want, that would be great.

For example, I assume you would want the UP, DOWN, LEFT, and RIGHT neighbors? The corner neighbors too?

OK. You want neighbors of a quadtree *cell*, such as the left neighbor of a quadtree cell, correct?
I have not interfaced this with MATLAB. However, please look at the source file:
'quadtree.cc'
and search for the class method:
'Locate_Left_Neighbor'
That is how you could do it from within C++. Interfacing it to MATLAB requires modifying 'mexQuadtree.cpp' and the corresponding MATLAB class.
I could expand the interface, but I cannot guarantee when that would happen. If you could give a few more details about what you want, that would be great.
For example, I assume you would want the UP, DOWN, LEFT, and RIGHT neighbors? The corner neighbors too?

Shir,
Yes! Look at the m-file:
'test_Quadtree_Random_Points.m'
in the 'Unit_Test' sub-directory. It does a demonstration of k-nearest neighbor find.
Also, if you have added 'QuadTree' to your MATLAB path, then you can type:
help mexQuadtree
help mexQuadtree.kNN_Search
to get more info about how to use it.

Comment only