Ragged edge arrays in LabVIEW? 
Author Message
 Ragged edge arrays in LabVIEW?

Hi all,
I'd like to implement a ragged edge array in labview (that is, an
array of arrays, each of different length).  LabVIEW only supports
symmetric arrays (rectangular) in their standard array types.  While I
could implement this as an array of clusters, with each cluster having
a single array, I was hoping there was a slightly less clunky method
of doing this...anyone have any ideas?

Thanks!



Tue, 10 Aug 2004 03:45:30 GMT  
 Ragged edge arrays in LabVIEW?
Hello,

It is not possible to have an array of arrays in LabVIEW...the best
method I can think of is the one you have already proposed...an array
of clusters of arrays...I can't imagine this implementation would be
too terribly difficult to manipulate.

We'll see if anybody else has any suggestions.

Darren



Tue, 10 Aug 2004 05:44:23 GMT  
 Ragged edge arrays in LabVIEW?

Quote:

> Hi all,
> I'd like to implement a ragged edge array in LabVIEW (that is, an
> array of arrays, each of different length).  LabVIEW only supports
> symmetric arrays (rectangular) in their standard array types.  While I
> could implement this as an array of clusters, with each cluster having
> a single array, I was hoping there was a slightly less clunky method
> of doing this...anyone have any ideas?

Try a cluster of arrays, each of which can have a different length.

Less elegant, but should get you going.

Mark



Tue, 10 Aug 2004 14:00:10 GMT  
 Ragged edge arrays in LabVIEW?
Unfortunately, the top level array size is not known in advance, so a
cluster won't work...


Wed, 11 Aug 2004 04:09:58 GMT  
 Ragged edge arrays in LabVIEW?
Another posibility is to use flags in your data, if it is well known.
For example, let say you arrange your data in columns. If all your
data is positive, then the end of the data array can be marked with a
negative number:

 2    3    3    2    4
 4    5   -1    4    7
 3    2    0    3    2
-1    5    0    0   -1
 0    6    0   -1    0
 0   -1    0    0    0

Here the "-1" indicates where the data in the column ends.

A variation can be that the first element in the columns indicates how
many valid elements are in the column.

Obviously, these approaches may need more coding, but can work.

-Enrique



Wed, 11 Aug 2004 04:38:57 GMT  
 Ragged edge arrays in LabVIEW?
An excellent idea!  Thanks!


Wed, 11 Aug 2004 06:26:22 GMT  
 Ragged edge arrays in LabVIEW?
Hi,
another solution is to use NaNs at the end of each array. It will not
decrease the memory usage but in any case the work with such 2D array
will be faster then with array of clusters.
The more complicated structure of your data (array of clusters of
arrays with different sizes) the slower your program.

Good luck.

Oleg Chutko.



Wed, 11 Aug 2004 06:35:51 GMT  
 Ragged edge arrays in LabVIEW?
Indeed, I'm attempting to minimize the memory and processing required
to run this little program.  Thanks for the advice!


Wed, 11 Aug 2004 07:58:04 GMT  
 Ragged edge arrays in LabVIEW?

Quote:
> I'd like to implement a ragged edge array in LabVIEW (that is, an
> array of arrays, each of different length).  LabVIEW only supports
> symmetric arrays (rectangular) in their standard array types.  While I
> could implement this as an array of clusters, with each cluster having
> a single array, I was hoping there was a slightly less clunky method
> of doing this...anyone have any ideas?

All the times I've wanted to do this, I've used an array of cluster
of array of ???.  It didn't seem clunky to me.  Multidimensional
arrays will always square off.  Direct arrays of arrays are not
allowed, and clusters the typical way of isolating them from one
another.

Greg McKaskle



Wed, 11 Aug 2004 12:16:35 GMT  
 Ragged edge arrays in LabVIEW?
By the way the use of NaNs is more convenient then the use of some
marks like negative numbers. Every operation with NaN will give you
the NaN as a result so you don't need to take care about
interpretation of marks after some operations.

Oleg Chutko.



Thu, 12 Aug 2004 04:26:43 GMT  
 
 [ 10 post ] 

 Relevant Pages 

1. 0 - True and Ragged Arrays

2. Ragged array

3. Ragged Array Proposal

4. Ragged array

5. Edge detector in Labview (6i)

6. printercode edge to edge

7. I need to manipulate only X values of Edge coordinates (IMAQ Find Vertical Edge VI)

8. USE both rising edge and falling edge

9. USE both rising edge and falling edge

10. Zope & Python mention in trade rags

11. BUG in LabVIEW 6.0.i (Array Subset)

12. The suitable LabVIEW data type correspinding to the array of structure in Visual Basic ActiveX DLL

 

 
Powered by phpBB® Forum Software