Packed storage matrix

Packed storage matrix

Packed storage matrix, also known as packed matrix, is a term used in programming for representing an m imes n matrix. It is a more compact way than an m-by-n rectangular array by exploiting a special structure of the matrix.

Typical examples of matrices that can take advantage of packed storage include:
* symmetric or hermitian matrix
* Triangular matrix
* Banded matrixThese are most notably used in BLAS and LAPACK. Various storage schemes for sparse matrices can also be regarded as packed storage.

For a symmetric, hermitian or triangular matrix, only the lower or upper triangle of the matrix needs to be stored. A banded matrix can be represented by storing the band only. Packed storage saves memory at the cost of more complicatedaccess to matrix elements. Because of this tradeoff, it is not always beneficial.

Code examples (Fortran)

Both of the following storage schemes are used extensively in BLAS and LAPACK.

An example of packed storage for hermitian matrix:

complex:: A(n,n) ! a hermitian matrixcomplex:: AP(n*(n+1)/2) ! packed storage for A! the lower triangle of A is stored column-by-column in AP.! unpacking the matrix AP to Ado j=1,n k = j*(j-1)/2 A(1:j,j) = AP(1+k:j+k) A(j,1:j-1) = conjg(AP(1+k:j-1+k))end do

An example of packed storage for banded matrix:

real:: A(m,n) ! a banded matrix with kl subdiagonals and ku superdiagonalsreal:: AP(-kl:ku,n) ! packed storage for A! the band of A is stored column-by-column in AP. Some elements of AP are unused.! unpacking the matrix AP to Ado j=1,n forall(i=max(1,j-kl):min(m,j+ku)) A(i,j) = AP(i-j,j)end doprint *,AP(0,:) ! the diagonal

Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать реферат

Look at other dictionaries:

  • List of mathematics articles (P) — NOTOC P P = NP problem P adic analysis P adic number P adic order P compact group P group P² irreducible P Laplacian P matrix P rep P value P vector P y method Pacific Journal of Mathematics Package merge algorithm Packed storage matrix Packing… …   Wikipedia

  • cell — cell1 cell like, adj. /sel/, n. 1. a small room, as in a convent or prison. 2. any of various small compartments or bounded areas forming part of a whole. 3. a small group acting as a unit within a larger organization: a local cell of the… …   Universalium

  • building construction — Techniques and industry involved in the assembly and erection of structures. Early humans built primarily for shelter, using simple methods. Building materials came from the land, and fabrication was dictated by the limits of the materials and… …   Universalium

  • Mathematics and Physical Sciences — ▪ 2003 Introduction Mathematics       Mathematics in 2002 was marked by two discoveries in number theory. The first may have practical implications; the second satisfied a 150 year old curiosity.       Computer scientist Manindra Agrawal of the… …   Universalium

  • Barcode — For the taxonomic method, see DNA barcoding. A UPC A barcode symbol A barcode is an optical machine readable representation of data, which shows data about the object to which it attaches. Originally barcodes represented data by varying the… …   Wikipedia

  • lipid — /lip id, luy pid/, n. Biochem. any of a group of organic compounds that are greasy to the touch, insoluble in water, and soluble in alcohol and ether: lipids comprise the fats and other esters with analogous properties and constitute, with… …   Universalium

  • Trie — A trie for keys A , to , tea , ted , ten , i , in , and inn . In computer science, a trie, or prefix tree, is an ordered tree data structure that is used to store an associative array where the keys are usually strings. Unlike a binary search… …   Wikipedia

  • metallurgy — metallurgic, metallurgical, adj. metallurgically, adv. metallurgist /met l err jist/ or, esp. Brit., /meuh tal euhr jist/, n. /met l err jee/ or, esp. Brit., /meuh tal euhr jee/, n. 1. the technique or science of working or heating metals so as… …   Universalium

  • spectroscopy — spectroscopist /spek tros keuh pist/, n. /spek tros keuh pee, spek treuh skoh pee/, n. the science that deals with the use of the spectroscope and with spectrum analysis. [1865 70; SPECTRO + SCOPY] * * * Branch of analysis devoted to identifying… …   Universalium

  • photography, technology of — Introduction       equipment, techniques, and processes used in the production of photographs.  The most widely used photographic process is the black and white negative–positive system (Figure 1 >). In the camera the lens projects an image of… …   Universalium

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”