Column major representation, Data Structure & Algorithms

Column Major Representation

In memory the second method of representing two-dimensional array is the column major representation. Under this illustration, the first column of the array occupies the first set of the memory locations kept for the array. The second column occupies next set & so forth. The representation of a column major representation is illustrated in Figure

Assume the following two-dimensional array:

1518_Column Major Representation.png

To make its equivalent column major representation, we carry out the following procedure:

Transpose the elements of the array. After that, the representation will be alike as that of the row major representation.

Through application of above denoted process, we get {a, e, i, b, f, j, c, g, k, d, h, i}

Col 0

Col 1

Col 2

.....

Col i

 

 

Figure: Schematic of Column major representation of an Array

1) In which array can be stored?

2) In which, the elements of array are stored row wise.

3) In which, the elements of array are stored column wise.

 

Posted Date: 4/4/2013 6:48:27 AM | Location : United States







Related Discussions:- Column major representation, Assignment Help, Ask Question on Column major representation, Get Answer, Expert's Help, Column major representation Discussions

Write discussion on Column major representation
Your posts are moderated
Related Questions
Comparison of Gouraud and Phong Shading Phong shading requires more calculations, but produces better results for specular reflection than Gouraud shading in the form of more r

Now, consider a function that calculates partial sum of an integer n. int psum(int n) { int i, partial_sum; partial_sum = 0;                                           /* L

Write an algorithm for binary search. What are its limitations? .

A linear list of elements in which deletion can be done from one end (front) and insertion can take place only at the other end (rear) is called as a   Queue.

Q. Describe the term array.  How do we represent two-dimensional arrays in memory?  Explain how we calculate the address of an element in a two dimensional array.

Q. Let a binary tree 'T' be in memory. Write a procedure to delete all terminal nodes of the tree.       A n s . fun ction to Delete Terminal Nodes from Binary Tree

Q. Explain the various memory allocation strategies.                                                            Ans. M e m ory Allocation Strategies are given as follow

State about the pre- and post conditions Programmers can easily document other pre- and post conditions and class invariants, though, and insert code to check most value preco

(a) Describe the steps involved in the process of decision making under uncertainty. (b) Explain the following principles of decision making: (i) Laplace, (ii) Hurwicz. (c

The below figure illustrates the BOM (Bill of Materials) for product A. The MPS (Material requirements Planning) start row in the master production schedule for product A calls for