LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

implementing a quadTree in labVIEW

I am trying to use a quadTree to efficiently store a 2-D map of data but have been having trouble figuring out how to go about it. I have written an implementation for a quadTree in Java and have been having some issues with the logistics for a labVIEW version. Has anyone else gotten something like this to work? I think it might be possible is I create a generic bundle for the quad nodes but I am unsure how to create it if the node would store its 4 children nodes inside of it. I am also a bit confused about how to deal with an empty node and how or if LabVIEW is able to deal with the concept of a "null" node. Thank you very much for your help.

Message 1 of 4
(2,641 Views)

I have looked into this and haven't had much luck finding documentation specifically on the implementation of a quadtree in LabVIEW.  

 

I'm not certain of your level of LabVIEW experience, but it may be worth taking a look at the cluster data type available in LabVIEW to see if that could be going in the direction of what you're looking for.  Is there a specific data type you're looking to store using a quadtree?  Also, when you reference a "node", are you referring to the smallest level within the quadtree structure?  Just want to be clear on the concept and what specifically you want to try and implement.

 

I'll continue to look into this and see what else I can find.

 

Regards,

National Instruments
0 Kudos
Message 2 of 4
(2,610 Views)

The "nodes" i am refering to are the individual elements in the tree so in the case of a quad tree each "node" would store some data as well have space for 4 references to "nodes" ie the nodes children. I have used clustering before and I thought it might be a good place to start I am just unsure how to create a new insance of a cluster, the "node", dynamicaly so I would not have to create a set number of "nodes" before the program starts. How the quadTree works in say java, is that if a new piece of data is added to a node that already has data, the node will split itself into 4 equal sized children and store the data which creates new nodes as the program is running. 

 

With that in mind, I am looking to implement this quadTree functionality in labVIEW to store data about a 2-D environment efficiently with the ability to say find all objects inside a given search area. The data I want to store about each point will be minimul, probably just a char or single number, but the bounds of the 2-D environment will be defined at runtime. The data structure will be holding a lot of points, on the order of at least several hundered points, and also needs to be able to scale with out being bogged down to much. 

 

Thanks again for the informantion. I have done a good amount of LabVIEW programming just not when dealing with creating advanced data structures. 

0 Kudos
Message 3 of 4
(2,586 Views)

I haven't looked at the details of the quadtree design, but there's a tree implementation which you might be able to adapt here - https://decibel.ni.com/content/docs/DOC-12668

 

It already seems to have an array for the children nodes, so it's possible you could also just inherit from it and limit the size of that array to 4, but I haven't looked at the actual implementation in a long time, so I don't know if it's as simple as that and if it will be efficient for your needs.


___________________
Try to take over the world!
0 Kudos
Message 4 of 4
(2,576 Views)