naginterfaces.library.matop.real_​tri_​pack

naginterfaces.library.matop.real_tri_pack(job, uplo, diag, a, b)[source]

real_tri_pack copies a real triangular matrix stored in a packed one-dimensional array into an unpacked two-dimensional array, or vice versa.

For full information please refer to the NAG Library document for f01za

https://www.nag.com/numeric/nl/nagdoc_29.3/flhtml/f01/f01zaf.html

Parameters
jobstr, length 1

Specifies whether the triangular matrix is to be packed or unpacked.

(Pack)

The matrix is to be packed into array .

(Unpack)

The matrix is to be unpacked into array .

uplostr, length 1

Specifies the type of the matrix to be copied

(Lower)

The matrix is lower triangular. In this case the packed vector holds, or will hold on exit, the matrix elements in the following order: , etc..

(Upper)

The matrix is upper triangular. In this case the packed vector holds, or will hold on exit, the matrix elements in the following order: , , , , , , , etc..

diagstr, length 1

Must specify whether the diagonal elements of the matrix are to be copied.

(Blank)

The diagonal elements of the matrix are not referenced and not copied.

(Unit diagonal)

The diagonal elements of the matrix are not referenced, but are assumed all to be unity, and are copied as such.

(Non-unit diagonal)

The diagonal elements of the matrix are referenced and copied.

afloat, array-like, shape

If , the leading by part of must contain the matrix to be copied, stored in unpacked form, in the upper or lower triangle depending on argument . The opposite triangle of is not referenced and need not be assigned.

bfloat, array-like, shape

If , must contain the triangular matrix packed by column.

Returns
afloat, ndarray, shape

If , the leading by part of array contains the copied matrix, stored in unpacked form, in the upper or lower triangle depending on argument . The opposite triangle of is not referenced.

bfloat, ndarray, shape

If , contains the triangular matrix packed by column.

Note that must have space for the diagonal elements of the matrix, even if these are not stored.

Raises
NagValueError
(errno )

On entry, or : .

(errno )

On entry, or : .

(errno )

On entry, , or : .

(errno )

On entry, .

Constraint: .

Notes

No equivalent traditional C interface for this routine exists in the NAG Library.

real_tri_pack unpacks a triangular matrix stored in a vector into a two-dimensional array, or packs a triangular matrix stored in a two-dimensional array into a vector. The matrix is packed by column. This function is intended for possible use in conjunction with functions from submodule blas, submodule lapacklin and submodule lapackeig where some functions that use triangular matrices store them in the packed form described below.