|
|||||||||||||
06-24-2010 07:30 PM
Hate to criticize this superb effort, but it appears that the order is not a uniform distribution - this test shows that of an array with 10 elements ordered 0..9, the "randomized" first element is 9 ~90% of the time, and 0 the other ~10%. Similarly, 8 is most often found in positions 2 and 10, 7 in 3 and 9, etc.
06-24-2010 07:32 PM
Looks like Jack got in before me...
06-24-2010 08:53 PM - edited 06-24-2010 08:55 PM
Aristos Queue wrote:
At the moment, we call this kind of VI a "generic VI", because the terms "template VI" and "polymorphic VI" are already taken by other features. "Generic" doesn't really say anything about what this kind of VI actually does, so if anyone has a better suggestion for these types of VIs, post them here. Keep in mind: it will be multiple versions of LV before this feature sees the light of day.
What about any of "{Totipotent, Pleuripotent, Multipotent, Oligopotent} VI?"
I leave it to AQ to decide which degree of potential is most descriptive
. It feels kind of pleuripotent to me.
06-24-2010 09:52 PM
I guess that Riffle is not being used under the hood.
06-25-2010
09:08 AM
- last edited on
06-29-2012
10:53 AM
by
MaryH
Argh. I thought I put the VI together correctly. Yes, it has a bias. Here's the corrected version. And a test VI to prove the distribution is right.
I'll ask a moderator to correct the original post so that future downloads are correct.
06-26-2010 08:33 PM
Aristos Queue wrote:
Here's the corrected version. And a test VI to prove the distribution is right.
Unless n=0 or 1, the first element of x/y is inf in my testing. Does not look right....
06-26-2010 09:54 PM
altenbach, you sure you're running the more recent Randomize version, i.e., the 9.04kB version as opposed to the 8.79kB version? I thought for a moment I confirmed your Inf concerns, but after ensuring I had the right version and restarting LabVIEW (including exiting GSW) the probability distribution looked correct and uniform (you're going to see the Inf problem with the old version).
06-27-2010 02:43 AM
Yes, you are right, it's all good.
While I did first open the new subVI straight from the browser, it actually became Randomize1DArray(1).vi in the download folder, while the original was still in there, dormant from earlier, with the right name randomize2DArray.vi.
When I then run the opened the Distribution.vi from the browser, it found the old version in the download folder....
06-28-2010 09:51 AM - edited 06-28-2010 09:53 AM
Interestingly, no matter what the downloaded file is called, the VI shows as Randomize 1D array.vi in the context help and in the title bar of the opened subVI.
For example, if I rename the subVI to alphabetagamma.vi, the context help looks as follows.
So, hovering over the VI, the context help shows the same name on top as the windows title of the only open subVI, even though the file names are not the same. Oh well, I need to be more careful when opening VIs directly from within the browser and also pay attention to the second line in the context help. ![]()
I guess since the VI is in run mode (passworded), we see the custom windows title instead of the actual file name and this threw me off.
08-28-2010 02:11 PM
http://en.wikipedia.org/wiki/Generic_programming
Generic should be the name of this kind of VI's.
Also I would beg NI to implement this feature as soon as possible (not that we have to wait for 2 years) because this feature would give a infinity number of new applications, http://forums.ni.com/t5/LabVIEW-Idea-Exchange/GOOP
My Profile | Privacy |
Legal |
Contact NI
© 2011 National Instruments Corporation. All rights reserved. | E-Mail this Page
|
||

E-Mail this Page