![]() |
|
|
|
#1 |
|
I am looking for a kd-tree implementation that returns the set of k closest
neighbors from a point P and a specified region R. Something like this: std::vector<MyNeighborType> neighbors; tree->Search( P, R, neighbors ) ; In the implementation that I have found its not possible to specify a neighbor type. I need this because each neighbor has some unique information that I must use in the following computations. Any suggestions on where to find a kd-tree that returns user-specified objects instead of basic vectors - location? carl |
|
|
|
|
#2 |
|
Posts: n/a
|
On Nov 2, 5:15*pm, "carl" <carl@.com> wrote:
> I am looking for a kd-tree implementation that returns the set of k closest > neighbors from a point P and a specified region R. Something like this: > > std::vector<MyNeighborType> neighbors; > * tree->Search( P, R, neighbors ) ; > > In the implementation that I have found its not possible to specify a > neighbor type. I need this because each neighbor has some unique information > that I must use in the following computations. > > Any suggestions on where to find a kd-tree that returns *user-specified > objects instead of basic vectors - location? Memorize pointers to objects instead of objects, store the common base class pointers into the vector and cast back the object with the dynamic_cast. This technique is often used in user interfaces where you cannot predict which specific set of objects the user will select. cheers paperab paperab |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| implementation of collapsible panel control in asp.net | bhawneshkumar | Software | 0 | 07-17-2009 06:38 AM |
| can anyone guide me in flight-mode implementation for Windows mobile 5.0? | vivekanand holla | Wireless Networking | 1 | 11-10-2005 11:15 AM |
| transport protocol implementation in NDIS | zenhwa | Wireless Networking | 0 | 09-15-2004 12:38 AM |
| REVIEW: "Enterprise Directory and Security Implementation Guide", Charles Carrington et al | Rob Slade, doting grandpa of Ryan and Trevor | Computer Security | 0 | 12-08-2003 03:43 PM |
| REVIEW: "Enterprise Directory and Security Implementation Guide", Charles Carrington et al | Rob Slade, doting grandpa of Ryan and Trevor | Computer Security | 0 | 12-01-2003 03:43 PM |