LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

map with LabVIEW

Solved!
Go to solution

hello all,

I wish to know, if it is possible to use map like in C++?

I have 2 arrays, one of string and one of dbl. The user need to write a name of parameter in string control, and after i need to find the value of this parameter by a searching in the string array. It's a long solution. And i need to do it many times. It's for that i have thinking of map in c++

If someone can hlep me ^^

thanks

0 Kudos
Message 1 of 8
(5,579 Views)

Hi mioumiou,

this should work for you.

 

 

Mike

Message Edited by MikeS81 on 02-10-2009 11:52 AM
Message 2 of 8
(5,576 Views)

thanks a lot for your quick answer.

I thought about this solution, but the problem, it's that i will have a array of 500 or more parameters, and this solution, will take a little bit of time to find just one parameter. And for each iteration of while loop, i need to make this research 500 times. This will take a very long time.

I think about map in c++ but if you are a better idea, i take  Smiley Happy

 

0 Kudos
Message 3 of 8
(5,570 Views)
Solution
Accepted by topic author mioumiou
Message 5 of 8
(5,534 Views)

thanks a lot,

variants seems to be the solution.

thanks thanks thanks Smiley Happy

0 Kudos
Message 6 of 8
(5,524 Views)

Many thanks, Phillip for point to these links. I was pretty skeptic about attributes before. But it just incredible!

Just done quick test - searching 25000 lines in 80000 strings dictionary taking approx. 22 seconds with search array, or 6 seconds with small improvement or just 20 milliseconds with Variant attributes.

1000 times faster... Still can't believe...

 

Andrey.

Message Edited by Andrey Dmitriev on 02-10-2009 04:01 PM
Message 7 of 8
(5,500 Views)
For a while we had a prototype of a generic map container on NI Labs.  It is listed now as a "graduate" which I think means that it should find its way in the product at some point.  You can follow the discussion and ask questions here.
Travis M
LabVIEW R&D
National Instruments
Message 8 of 8
(5,493 Views)