Why is it Possible to Receive an Array of Dimensions N x 0?Primary Software: LabVIEW Development Systems>>LabVIEW Professional Development SystemPrimary Software Version: N/A Primary Software Fixed Version: N/A Secondary Software: LabVIEW Development Systems>>LabVIEW Professional Development System
Problem: My LabVIEW program produces an array of dimensions N x 0. How is this possible and are there any valid uses for this structure? Solution: There are multiple ways that an array of size N x 0 can be created in LabVIEW. A couple of examples arise when using an array constant to build an array with either the Build Array function or an auto-indexing for loop in LabVIEW. The following diagram displays a program that uses both of these methods to create a N x 0 array. The dimensions of the resulting arrays displayed are expected and can be useful in certain cases. Common algorithms in linear algebra, called blocked algorithms, partition a matrix into 4 quadrants. This can be thought of as defining row and column splitters. There are then 4 sub matrices from the original matrix. To move within the matrix, the algorithm starts with the row and column splitter at position zero. In this case, the lower right sub matrix is the size of the entire matrix. For an M x N matrix, the other three are M x 0, 0 x 0, and 0 x N. Maintaining these non-zero dimensions improves the readability of the algorithm and actually cleans up the dimension arithmetic that is used from iteration to iteration as the row and column splitters move down and across the matrix. Example Implementation This concept is implemented as a use case within FLAME. This approach is used in its algorithm design to achieve high-performance solutions to linear algebra functions by working with sub matrices that fit in the processor cache. For more information about FLAME see the link below. Related Links: FLAME: Formal Linear Algebra Method Environment Attachments:
Report Date: 10/02/2008 Last Updated: 10/16/2008 Document ID: 4Q1ED4ES |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
