LAPACK  3.4.1
LAPACK: Linear Algebra PACKage
dtpttr.f
Go to the documentation of this file.
00001 *> \brief \b DTPTTR
00002 *
00003 *  =========== DOCUMENTATION ===========
00004 *
00005 * Online html documentation available at 
00006 *            http://www.netlib.org/lapack/explore-html/ 
00007 *
00008 *> \htmlonly
00009 *> Download DTPTTR + dependencies 
00010 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtpttr.f"> 
00011 *> [TGZ]</a> 
00012 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtpttr.f"> 
00013 *> [ZIP]</a> 
00014 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtpttr.f"> 
00015 *> [TXT]</a>
00016 *> \endhtmlonly 
00017 *
00018 *  Definition:
00019 *  ===========
00020 *
00021 *       SUBROUTINE DTPTTR( UPLO, N, AP, A, LDA, INFO )
00022 * 
00023 *       .. Scalar Arguments ..
00024 *       CHARACTER          UPLO
00025 *       INTEGER            INFO, N, LDA
00026 *       ..
00027 *       .. Array Arguments ..
00028 *       DOUBLE PRECISION   A( LDA, * ), AP( * )
00029 *       ..
00030 *  
00031 *
00032 *> \par Purpose:
00033 *  =============
00034 *>
00035 *> \verbatim
00036 *>
00037 *> DTPTTR copies a triangular matrix A from standard packed format (TP)
00038 *> to standard full format (TR).
00039 *> \endverbatim
00040 *
00041 *  Arguments:
00042 *  ==========
00043 *
00044 *> \param[in] UPLO
00045 *> \verbatim
00046 *>          UPLO is CHARACTER*1
00047 *>          = 'U':  A is upper triangular.
00048 *>          = 'L':  A is lower triangular.
00049 *> \endverbatim
00050 *>
00051 *> \param[in] N
00052 *> \verbatim
00053 *>          N is INTEGER
00054 *>          The order of the matrix A. N >= 0.
00055 *> \endverbatim
00056 *>
00057 *> \param[in] AP
00058 *> \verbatim
00059 *>          AP is DOUBLE PRECISION array, dimension ( N*(N+1)/2 ),
00060 *>          On entry, the upper or lower triangular matrix A, packed
00061 *>          columnwise in a linear array. The j-th column of A is stored
00062 *>          in the array AP as follows:
00063 *>          if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
00064 *>          if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
00065 *> \endverbatim
00066 *>
00067 *> \param[out] A
00068 *> \verbatim
00069 *>          A is DOUBLE PRECISION array, dimension ( LDA, N )
00070 *>          On exit, the triangular matrix A.  If UPLO = 'U', the leading
00071 *>          N-by-N upper triangular part of A contains the upper
00072 *>          triangular part of the matrix A, and the strictly lower
00073 *>          triangular part of A is not referenced.  If UPLO = 'L', the
00074 *>          leading N-by-N lower triangular part of A contains the lower
00075 *>          triangular part of the matrix A, and the strictly upper
00076 *>          triangular part of A is not referenced.
00077 *> \endverbatim
00078 *>
00079 *> \param[in] LDA
00080 *> \verbatim
00081 *>          LDA is INTEGER
00082 *>          The leading dimension of the array A.  LDA >= max(1,N).
00083 *> \endverbatim
00084 *>
00085 *> \param[out] INFO
00086 *> \verbatim
00087 *>          INFO is INTEGER
00088 *>          = 0:  successful exit
00089 *>          < 0:  if INFO = -i, the i-th argument had an illegal value
00090 *> \endverbatim
00091 *
00092 *  Authors:
00093 *  ========
00094 *
00095 *> \author Univ. of Tennessee 
00096 *> \author Univ. of California Berkeley 
00097 *> \author Univ. of Colorado Denver 
00098 *> \author NAG Ltd. 
00099 *
00100 *> \date November 2011
00101 *
00102 *> \ingroup doubleOTHERcomputational
00103 *
00104 *  =====================================================================
00105       SUBROUTINE DTPTTR( UPLO, N, AP, A, LDA, INFO )
00106 *
00107 *  -- LAPACK computational routine (version 3.4.0) --
00108 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
00109 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
00110 *     November 2011
00111 *
00112 *     .. Scalar Arguments ..
00113       CHARACTER          UPLO
00114       INTEGER            INFO, N, LDA
00115 *     ..
00116 *     .. Array Arguments ..
00117       DOUBLE PRECISION   A( LDA, * ), AP( * )
00118 *     ..
00119 *
00120 *  =====================================================================
00121 *
00122 *     .. Parameters ..
00123 *     ..
00124 *     .. Local Scalars ..
00125       LOGICAL            LOWER
00126       INTEGER            I, J, K
00127 *     ..
00128 *     .. External Functions ..
00129       LOGICAL            LSAME
00130       EXTERNAL           LSAME
00131 *     ..
00132 *     .. External Subroutines ..
00133       EXTERNAL           XERBLA
00134 *     ..
00135 *     .. Executable Statements ..
00136 *
00137 *     Test the input parameters.
00138 *
00139       INFO = 0
00140       LOWER = LSAME( UPLO, 'L' )
00141       IF( .NOT.LOWER .AND. .NOT.LSAME( UPLO, 'U' ) ) THEN
00142          INFO = -1
00143       ELSE IF( N.LT.0 ) THEN
00144          INFO = -2
00145       ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
00146          INFO = -5
00147       END IF
00148       IF( INFO.NE.0 ) THEN
00149          CALL XERBLA( 'DTPTTR', -INFO )
00150          RETURN
00151       END IF
00152 *
00153       IF( LOWER ) THEN
00154          K = 0
00155          DO J = 1, N
00156             DO I = J, N
00157                K = K + 1
00158                A( I, J ) = AP( K )
00159             END DO
00160          END DO
00161       ELSE
00162          K = 0
00163          DO J = 1, N
00164             DO I = 1, J
00165                K = K + 1
00166                A( I, J ) = AP( K )
00167             END DO
00168          END DO
00169       END IF
00170 *
00171 *
00172       RETURN
00173 *
00174 *     End of DTPTTR
00175 *
00176       END
 All Files Functions