NAG Library Routine Document F07HAF (DPBSV)

Similar documents
NAG Fortran Library Routine Document F04CFF.1

NAG Library Routine Document F08UBF (DSBGVX)

NAG Library Routine Document F08FAF (DSYEV)

NAG Library Routine Document F08FPF (ZHEEVX)

NAG Library Routine Document F08JDF (DSTEVR)

NAG Library Routine Document F08PNF (ZGEES)

NAG Library Routine Document F08VAF (DGGSVD)

NAG Library Routine Document F08FNF (ZHEEV).1

NAG Library Routine Document F08QVF (ZTRSYL)

NAG Library Routine Document F08QUF (ZTRSEN)

NAG Library Routine Document F08YUF (ZTGSEN).1

NAG Library Routine Document F02HDF.1

NAG Library Routine Document F08ZFF (DGGRQF).1

F08BEF (SGEQPF/DGEQPF) NAG Fortran Library Routine Document

NAG Toolbox for Matlab nag_lapack_dggev (f08wa)

NAG Fortran Library Routine Document D02JAF.1

NAG Library Routine Document D02JAF.1

Module 6.6: nag nsym gen eig Nonsymmetric Generalized Eigenvalue Problems. Contents

F04JGF NAG Fortran Library Routine Document

NAG Library Routine Document C02AGF.1

Module 5.2: nag sym lin sys Symmetric Systems of Linear Equations. Contents

G01NBF NAG Fortran Library Routine Document

G03ACF NAG Fortran Library Routine Document

LAPACK-Style Codes for Pivoted Cholesky and QR Updating

G13CCF NAG Fortran Library Routine Document

LAPACK-Style Codes for Pivoted Cholesky and QR Updating. Hammarling, Sven and Higham, Nicholas J. and Lucas, Craig. MIMS EPrint: 2006.

NAG C Library Function Document nag_dtrevc (f08qkc)

G13CGF NAG Fortran Library Routine Document

G13BHF NAG Fortran Library Routine Document

LAPACK-Style Codes for Level 2 and 3 Pivoted Cholesky Factorizations. C. Lucas. Numerical Analysis Report No February 2004

G13BAF NAG Fortran Library Routine Document

NAG Toolbox for MATLAB Chapter Introduction. F02 Eigenvalues and Eigenvectors

Aasen s Symmetric Indefinite Linear Solvers in LAPACK

D03PEF NAG Fortran Library Routine Document

G13DSF NAG Fortran Library Routine Document

Generalized interval arithmetic on compact matrix Lie groups

NAG Library Routine Document D02KDF.1

Algorithm 853: an Efficient Algorithm for Solving Rank-Deficient Least Squares Problems

Exponentials of Symmetric Matrices through Tridiagonal Reductions

D02TYF NAG Fortran Library Routine Document

G13DCF NAG Fortran Library Routine Document

Intel Math Kernel Library (Intel MKL) LAPACK

NAG Toolbox for Matlab. g03aa.1

Computing least squares condition numbers on hybrid multicore/gpu systems

Implementation for LAPACK of a Block Algorithm for Matrix 1-Norm Estimation

2 MULTIPLYING COMPLEX MATRICES It is rare in matrix computations to be able to produce such a clear-cut computational saving over a standard technique

Unsupervised Data Discretization of Mixed Data Types

G13DJF NAG Fortran Library Routine Document

A Backward Stable Hyperbolic QR Factorization Method for Solving Indefinite Least Squares Problem

Using Godunov s Two-Sided Sturm Sequences to Accurately Compute Singular Vectors of Bidiagonal Matrices.

A note on eigenvalue computation for a tridiagonal matrix with real eigenvalues Akiko Fukuda

Stability of a method for multiplying complex matrices with three real matrix multiplications. Higham, Nicholas J. MIMS EPrint: 2006.

NAG Fortran Library Routine Document D01BBF.1

Porting a Sphere Optimization Program from lapack to scalapack

Computation of a canonical form for linear differential-algebraic equations

Algebraic Equations. 2.0 Introduction. Nonsingular versus Singular Sets of Equations. A set of linear algebraic equations looks like this:

Module 10.1: nag polynom eqn Roots of Polynomials. Contents

NAG Library Chapter Introduction. f08 Least-squares and Eigenvalue Problems (LAPACK)

A.l INTRODUCTORY CONCEPTS AND OPERATIONS umnx, = b, az3z3 = b, i = 1,... m (A.l-2)

A New Block Algorithm for Full-Rank Solution of the Sylvester-observer Equation.

Week6. Gaussian Elimination. 6.1 Opening Remarks Solving Linear Systems. View at edx

Positive Denite Matrix. Ya Yan Lu 1. Department of Mathematics. City University of Hong Kong. Kowloon, Hong Kong. Abstract

Symmetric Pivoting in ScaLAPACK Craig Lucas University of Manchester Cray User Group 8 May 2006, Lugano

CVXOPT Documentation. Release 1.2. Martin S. Andersen, Joachim Dahl, and Lieven Vandenberghe

NAG Fortran Library Routine Document D02KDF.1

A hybrid Hermitian general eigenvalue solver

Theoretical Computer Science

On aggressive early deflation in parallel variants of the QR algorithm

Direct Methods for Matrix Sylvester and Lyapunov Equations

Institute for Advanced Computer Studies. Department of Computer Science. On the Adjoint Matrix. G. W. Stewart y ABSTRACT

LAPACK Introduction. Zhaojun Bai University of California/Davis. James Demmel University of California/Berkeley

Parallel tools for solving incremental dense least squares problems. Application to space geodesy. LAPACK Working Note 179

Jacobian conditioning analysis for model validation

MPI Implementations for Solving Dot - Product on Heterogeneous Platforms

OUTLINE 1. Introduction 1.1 Notation 1.2 Special matrices 2. Gaussian Elimination 2.1 Vector and matrix norms 2.2 Finite precision arithmetic 2.3 Fact

Module 10.2: nag nlin eqn Roots of a Single Nonlinear Equation. Contents

DIRECT METHODS FOR MATRIX SYLVESTER AND LYAPUNOV EQUATIONS

Testing Linear Algebra Software

1. Introduction. Applying the QR algorithm to a real square matrix A yields a decomposition of the form

D. Gimenez, M. T. Camara, P. Montilla. Aptdo Murcia. Spain. ABSTRACT

Notes on LU Factorization

Lecture 2 INF-MAT : , LU, symmetric LU, Positve (semi)definite, Cholesky, Semi-Cholesky

Chapter 12 Block LU Factorization

7.5 Operations with Matrices. Copyright Cengage Learning. All rights reserved.

arxiv: v1 [math.na] 7 May 2009

The LINPACK Benchmark in Co-Array Fortran J. K. Reid Atlas Centre, Rutherford Appleton Laboratory, Chilton, Didcot, Oxon OX11 0QX, UK J. M. Rasmussen

The QR Algorithm. Chapter The basic QR algorithm

D01BBF NAG Fortran Library Routine Document

NAG Toolbox for Matlab. g08cd.1

Evaluation and Benchmarking of Highly Scalable Parallel Numerical Libraries

Adaptive Spike-Based Solver 1.0 User Guide

Performance Analysis of Parallel Alternating Directions Algorithm for Time Dependent Problems

Block-Partitioned Algorithms for. Solving the Linear Least Squares. Problem. Gregorio Quintana-Orti, Enrique S. Quintana-Orti, and Antoine Petitet

Gaussian Elimination and Back Substitution

More Gaussian Elimination and Matrix Inversion

LU Factorization. Marco Chiarandini. DM559 Linear and Integer Programming. Department of Mathematics & Computer Science University of Southern Denmark

COMPUTING THE CONDITION NUMBER OF TRIDIAGONAL AND DIAGONAL-PLUS-SEMISEPARABLE MATRICES IN LINEAR TIME

Linear algebra. Chapter Introduction

Today s class. Linear Algebraic Equations LU Decomposition. Numerical Methods, Fall 2011 Lecture 8. Prof. Jinbo Bi CSE, UConn

A Divide-and-Conquer Algorithm for Functions of Triangular Matrices

Transcription:

NAG Library Routine Document (DPBSV) Note: before using this routine, please read the Users Note for your implementation to check the interpretation of bold italicised terms and other implementation-dependent details. 1 Purpose (DPBSV) computes the solution to a real system of linear equations AX ¼ B, where A is an n by n symmetric positive definite band matrix of bandwidth ð2k d þ 1Þ and X and B are n by r matrices. 2 Specification SUBROUTINE (UPLO, N, KD, NRHS, AB, LDAB, B, LDB, INFO) INTEGER N, KD, NRHS, LDAB, LDB, INFO REAL (KIND=nag_wp) AB(LDAB,*), B(LDB,*) CHARACTER(1) UPLO The routine may be called by its LAPACK name dpbsv. 3 Description (DPBSV) uses the Cholesky decomposition to factor A as A ¼ U T U if UPLO ¼ U or A ¼ LL T if UPLO ¼ L, where U is an upper triangular band matrix, and L is a lower triangular band matrix, with the same number of superdiagonals or subdiagonals as A. The factored form of A is then used to solve the system of equations AX ¼ B. 4 References Anderson E, Bai Z, Bischof C, Blackford S, Demmel J, Dongarra J J, Du Croz J J, Greenbaum A, Hammarling S, McKenney A and Sorensen D (1999) LAPACK Users Guide (3rd Edition) SIAM, Philadelphia http://www.netlib.org/lapack/lug Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore 5 Parameters 1: UPLO CHARACTER(1) Input On entry: if UPLO ¼ U, the upper triangle of A is stored. If UPLO ¼ L, the lower triangle of A is stored. Constraint: UPLO ¼ U or L. 2: N INTEGER Input On entry: n, the number of linear equations, i.e., the order of the matrix A. Constraint: N 0..1

NAG Library Manual 3: KD INTEGER Input On entry: k d, the number of superdiagonals of the matrix A if UPLO ¼ U, or the number of subdiagonals if UPLO ¼ L. Constraint: KD 0. 4: NRHS INTEGER Input On entry: r, the number of right-hand sides, i.e., the number of columns of the matrix B. Constraint: NRHS 0. 5: ABðLDAB,Þ REAL (KIND=nag_wp) array Input/Output Note: the second dimension of the array AB must be at least maxð1; NÞ. On entry: the upper or lower triangle of the symmetric band matrix A. The matrix is stored in rows 1 to k d þ 1, more precisely, if UPLO ¼ U, the elements of the upper triangle of A within the band must be stored with element A ij in ABðk d þ 1 þ i j; jþ for maxð1;j k d Þ i j; if UPLO ¼ L, the elements of the lower triangle of A within the band must be stored with element A ij in ABð1 þ i j; jþ for j i minðn; j þ k d Þ. On exit: if INFO ¼ 0, the triangular factor U or L from the Cholesky factorization A ¼ U T U or A ¼ LL T of the band matrix A, in the same storage format as A. 6: LDAB INTEGER Input On entry: the first dimension of the array AB as declared in the (sub)program from which (DPBSV) is called. Constraint: LDAB KD þ 1. 7: BðLDB,Þ REAL (KIND=nag_wp) array Input/Output Note: the second dimension of the array B must be at least maxð1; NRHSÞ. On entry: the n by r right-hand side matrix B. On exit: if INFO ¼ 0, the n by r solution matrix X. 8: LDB INTEGER Input On entry: the first dimension of the array B as declared in the (sub)program from which (DPBSV) is called. Constraint: LDB maxð1; NÞ. 9: INFO INTEGER Output On exit: INFO ¼ 0 unless the routine detects an error (see Section 6). 6 Error Indicators and Warnings Errors or warnings detected by the routine: INFO < 0 If INFO ¼ i, the ith argument had an illegal value. execution of the program is terminated. An explanatory message is output, and.2

INFO > 0 If INFO ¼ i, the leading minor of order i of A is not positive definite, so the factorization could not be completed, and the solution has not been computed. 7 Accuracy The computed solution for a single right-hand side, ^x, satisfies an equation of the form ða þ EÞ^x ¼ b, where kek 1 ¼ OðÞA k k 1 and is the machine precision. An approximate error bound for the computed solution is given by k^x xk 1 A ð Þ kek 1, kxk 1 kak 1 where A ð Þ ¼ A 1 1 kak 1, the condition number of A with respect to the solution of the linear equations. See Section 4.4 of Anderson et al. (1999) for further details. F07HBF (DPBSVX) is a comprehensive LAPACK driver that returns forward and backward error bounds and an estimate of the condition number. Alternatively, F04BFF solves Ax ¼ b and returns a forward error bound and condition estimate. F04BFF calls (DPBSV) to solve the equations. 8 Further Comments When n k, the total number of floating point operations is approximately nkþ ð 1Þ 2 þ 4nkr, where k is the number of superdiagonals and r is the number of right-hand sides. The complex analogue of this routine is F07HNF (ZPBSV). 9 Example This example solves the equations Ax ¼ b, where A is the symmetric positive definite band matrix 0 1 0 1 5:49 2:68 0 0 22:09 2:68 5:63 2:39 0 A ¼ B C 9:31 @ 0 2:39 2:60 2:22 A and b ¼ B C @ 5:24 A. 0 0 2:22 5:17 11:83 Details of the Cholesky factorization of A are also output. 9.1 Program Text Program f07hafe! Example Program Text! Release. NAG Copyright 2012.!.. Use Statements.. Use nag_library, Only: dpbsv, nag_wp, x04cef!.. Implicit None Statement.. Implicit None!.. Parameters.. Integer, Parameter :: nin = 5, nout = 6 Character (1), Parameter :: uplo = U!.. Local Scalars.. Integer :: i, ifail, info, j, kd, ldab, n.3

NAG Library Manual!.. Local Arrays.. Real (Kind=nag_wp), Allocatable :: ab(:,:), b(:)!.. Intrinsic Procedures.. Intrinsic :: max, min!.. Executable Statements.. Write (nout,*) Example Program Results Write (nout,*)! Skip heading in data file Read (nin,*) Read (nin,*) n, kd ldab = kd + 1 Allocate (ab(ldab,n),b(n))! Read the upper or lower triangular part of the band matrix A! from data file If (uplo== U ) Then Read (nin,*)((ab(kd+1+i-j,j),j=i,min(n,i+kd)),i=1,n) Else If (uplo== L ) Then Read (nin,*)((ab(1+i-j,j),j=max(1,i-kd),i),i=1,n)! Read b from data file Read (nin,*) b(1:n)! Solve the equations Ax = b for x! The NAG name equivalent of dpbsv is f07haf Call dpbsv(uplo,n,kd,1,ab,ldab,b,n,info) If (info==0) Then! Print solution Write (nout,*) Solution Write (nout,99999) b(1:n)! Print details of factorization Write (nout,*) Flush (nout)! ifail: behaviour on error exit! =0 for hard exit, =1 for quiet-soft, =-1 for noisy-soft ifail = 0 If (uplo== U ) Then Call x04cef(n,n,0,kd,ab,ldab, Cholesky factor U,ifail) Else If (uplo== L ) Then Call x04cef(n,n,kd,0,ab,ldab, Cholesky factor L,ifail) Else Write (nout,99998) The leading minor of order, info, & is not positive definite 99999 Format ((3X,7F11.4)) 99998 Format (1X,A,I3,A) End Program f07hafe 9.2 Program Data Example Program Data 4 1 :Values of N and KD 5.49 2.68.4

5.63-2.39 2.60-2.22 5.17 :End of matrix A 22.09 9.31-5.24 11.83 :End of vector b 9.3 Program Results Example Program Results Solution 5.0000-2.0000-3.0000 1.0000 Cholesky factor U 1 2 3 4 1 2.3431 1.1438 2 2.0789-1.1497 3 1.1306-1.9635 4 1.1465.5 (last)