LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

tree

Hello

Could someone plus help me build a tree. What I need is from some input coming in, build a data base as a tree. Please see attachment:

1    he

2    she

3    his

4     hers....

for example if I have the above word coming in, how do I build a tree like the one one the picture?

so basically I have 1 character at a time, after each character is a node. We start from the first word than always go back to the origin to add ather word. at the end of each word add its number...

any help is appreciated. I am creating a database of words a tree.

 

 

0 Kudos
Message 1 of 2
(2,373 Views)

Depends on your LabVIEW skills and performance requirements. It's not a very easy task to implement a by-ref structure in LabVIEW.

 

Advanced & Slow: Use a by-ref OOP design (DVR).

Simple & a bit faster: Keep all nodes in an array. Each node consists of the key (char, length) and a list (array) containing the indices of 'next nodes' -> together this is a cluster.

 

Felix

0 Kudos
Message 2 of 2
(2,348 Views)