07-30-2007 01:52 AM
Our purpose is to design some generic containers in LabVIEW. Map is the first prototype we created.
The generic containers are data type independent widely used data structures. By using generic container methods, the LabVIEW developer can easily and efficiently store, read and handle any type of data, from simple integers type to complex clusters type.
The Generic Container Map is optimized for the fast retrieval of values by sort key. You can use the Generic Container Map when an application requires a large number of searching or query operations.
Your feedback is highly appreciated!
08-09-2007 09:21 AM
I have some questions about "map", and I had written up in your space.(blog)
Pls check it. and hope your feedback.
08-11-2007 04:31 PM
FYI
Looks like the install will not install examples to the 8.5 dir if it is installed
08-12-2007 12:19 AM
No, it only installs on LabVIEW 8.2.
NJKirchner 写:
FYI
Looks like the install will not install examples to the 8.5 dir if it is installed
08-12-2007 12:56 AM
GaoJie asked me some questions in Chinese. I translated his questions and my answers into English here:
高杰 写:I have some questions about "map", and I had written up in your space.(blog)
Pls check it. and hope your feedback.
1. Q: If I have lots of data, can this Map container help me
save the memory?
A: No. The Map cannot save memory for you. But
it increases the efficiency of your program. Inside the Map, it organized
the data in a balanced binary tree. The
time complexity of searching a data with the Map is O(log n), it is faster than
the one with a liner data structure O(n).
2. Q: Can I use the Map recursively?
A: Yes, you can use A map as the
data value of an element in another Map.
4: Q: Can I build my VI that used
the Map into EXE?
A:
No, you can only use the Map inside LabVIEW environment.We will solve this problem in the future.
08-16-2007 02:48 AM
08-24-2007 03:58 PM
08-26-2007 12:03 AM - edited 08-26-2007 12:03 AM
OK, I tried to do something along the lines of the example from the documentation and run into serious problems:
Some suggestions:
Other problems:
Why does the way I list all items produce incorrect results? Can you find what I did wrong?
Message Edited by altenbach on 08-25-2007 10:07 PM
08-28-2007 04:01 AM
It is because that our Map container is for general purpose. The data numbers in the Map is uncertain. It's hard to select a suitable Hash Function for it. When the data number is huge, collision always happens. In this case, the Hash Table is not as efficient as the binary tree.
tchristm 写:
Is there a reason that you implemented your Map as a tree instead of a Hash Table? I thought those had faster lookup than Tree-backed maps.
08-28-2007 04:29 AM
altenbach 写:
OK, I tried to do something along the lines of the example from the documentation and run into serious problems:
- I created the data cluster (name, email, phone) and seach key and added 4 entries of the address book to the map. This seems to work.
- For some reason, the map data has different labels (email, phone, phone2), according to the cluster how I first created it (problem1.vi). I don't remember exactly in what order I created the items, but something went definitely wrong.
- It seems the map does NOT update correctly if I would change the label of one of the cluster elements of the type after it is wired up.
- Only if I remove all elements from the type cluster and reinsert them in the right order, the filed names get updated correctly.
- It does not seem to be possible to list elements as instructed, the output is corrupt (see both attached VIs).
Some suggestions:
- I accordance with standard LabVIEW error handling, all boolean status outputs should be reversed so they are TRUE if there is a problem.
- For FIND, the boolean output should be labeled "not found". (For the current definition, it should be labeled "found", no "find")
- For NEXT, the boolean output should be "invalid" so we can wire it to a "stop if true" conditional terminal.
- Actually, I am not sure if we really need these boolean outputs. Can't we use the error cluster for this?
- Why does FIND have a "key out" If it just duplicates the input, we don't need this.
Other problems:
- The context help works if I hover over the icons on the diagram. They don't work if I hover over the icons in the palette.
- The example in the documentation "list all items" should have an autoindexing output tunnel to create an array of values.
Why does the way I list all items produce incorrect results? Can you find what I did wrong?
Message Edited by altenbach on 08-25-2007 10:07 PM
The map data actually should not expose to customers. We will finally hide it from users. So the label in it is meaningless.