qrupdate-ng 1.2.0
Loading...
Searching...
No Matches
LU Decomposition

Routines for updating the LU factorization of a matrix after a rank-1 modification. More...

Functions

subroutine clu1up (m, n, l, ldl, r, ldr, u, v)
 Updates an LU factorization after a rank-1 modification.
subroutine clup1up (m, n, l, ldl, r, ldr, p, u, v, w)
 Updates a row-pivoted LU factorization after rank-1 modification.
subroutine dlu1up (m, n, l, ldl, r, ldr, u, v)
 Updates an LU factorization after a rank-1 modification.
subroutine dlup1up (m, n, l, ldl, r, ldr, p, u, v, w)
 Updates a row-pivoted LU factorization after rank-1 modification.
subroutine slu1up (m, n, l, ldl, r, ldr, u, v)
 Updates an LU factorization after a rank-1 modification.
subroutine slup1up (m, n, l, ldl, r, ldr, p, u, v, w)
 Updates a row-pivoted LU factorization after rank-1 modification.
subroutine zlu1up (m, n, l, ldl, r, ldr, u, v)
 Updates an LU factorization after a rank-1 modification.
subroutine zlup1up (m, n, l, ldl, r, ldr, p, u, v, w)
 Updates a row-pivoted LU factorization after rank-1 modification.

Detailed Description

Routines for updating the LU factorization of a matrix after a rank-1 modification.

This group provides both standard LU updates and pivoted LU updates (handling row permutations for stability). The updates are implemented using the Bennett algorithm, which is significantly more efficient than full re-decomposition.

Function Documentation

◆ clu1up()

subroutine clu1up ( integer, intent(in) m,
integer, intent(in) n,
complex(real32), dimension(ldl,*), intent(inout) l,
integer, intent(in) ldl,
complex(real32), dimension(ldr,*), intent(inout) r,
integer, intent(in) ldr,
complex(real32), dimension(*), intent(inout) u,
complex(real32), dimension(*), intent(inout) v )

Updates an LU factorization after a rank-1 modification.

Definition:
!>       subroutine clu1up(m,n,L,ldl,R,ldr,u,v)
!>
!>       .. Scalar Arguments ..
!>       integer            m, n, ldl, ldr
!>       ..
!>       .. Array Arguments ..
!>       complex            L(ldl,*), R(ldr,*), u(*), v(*)
!>       ..
!> 
Purpose:
!>
!> CLU1UP updates an LU factorization after rank-1 modification.
!> Given an m-by-k lower-triangular matrix L with unit diagonal and
!> a k-by-n upper-trapezoidal matrix R, where k = min(m,n), this
!> CLU1UP updates L -> L1 and R -> R1 so that L1 is again
!> lower unit triangular, R1 upper trapezoidal, and
!> L1*R1 = L*R + u*v', where v' denotes the conjugate transpose of
!> v.
!>
!> The update is performed using the Bennett algorithm with
!> column-major access, which processes the leading k-by-k block
!> first and then finishes the trailing part of R if needed.
!> 
Parameters
[in]m
!>          m is INTEGER
!>          The number of rows of the matrix L.  m >= 0.
!> 
[in]n
!>          n is INTEGER
!>          The number of columns of the matrix R.  n >= 0.
!> 
[in,out]L
!>          L is COMPLEX array, dimension (ldl,k)
!>          On entry, the unit lower triangular matrix L.  On exit,
!>          the updated unit lower triangular matrix L1.
!> 
[in]ldl
!>          ldl is INTEGER
!>          The leading dimension of the array L.  ldl >= m.
!> 
[in,out]R
!>          R is COMPLEX array, dimension (ldr,n)
!>          On entry, the upper trapezoidal m-by-n matrix R.
!>          On exit, the updated upper trapezoidal matrix R1.
!> 
[in]ldr
!>          ldr is INTEGER
!>          The leading dimension of the array R.  ldr >= k,
!>          where k = min(m,n).
!> 
[in,out]u
!>          u is COMPLEX array, dimension (m)
!>          On entry, the left m-vector defining the rank-1
!>          modification.  On exit, if k < m, u is destroyed;
!>          otherwise, u contains the updated vector.
!> 
[in,out]v
!>          v is COMPLEX array, dimension (n)
!>          On entry, the right n-vector defining the rank-1
!>          modification.  On exit, v is destroyed.
!> 

Definition at line 107 of file clu1up.f90.

◆ clup1up()

subroutine clup1up ( integer, intent(in) m,
integer, intent(in) n,
complex(real32), dimension(ldl,*), intent(inout) l,
integer, intent(in) ldl,
complex(real32), dimension(ldr,*), intent(inout) r,
integer, intent(in) ldr,
integer, dimension(*), intent(inout) p,
complex(real32), dimension(*), intent(in) u,
complex(real32), dimension(*), intent(in) v,
complex(real32), dimension(*), intent(out) w )

Updates a row-pivoted LU factorization after rank-1 modification.

Definition:
!>       subroutine clup1up(m,n,L,ldl,R,ldr,p,u,v,w)
!>
!>       .. Scalar Arguments ..
!>       integer            m, n, ldl, ldr
!>       ..
!>       .. Array Arguments ..
!>       integer            p(*)
!>       complex            L(ldl,*), R(ldr,*), u(*), v(*), w(*)
!>       ..
!> 
Purpose:
!>
!> CLUP1UP updates a row-pivoted LU factorization after rank-1
!> modification.  Given an m-by-k lower-triangular matrix L with
!> unit diagonal, a k-by-n upper-trapezoidal matrix R, and a
!> permutation vector p, where k = min(m,n), CLUP1UP
!> updates L -> L1, R -> R1 and p -> p1 so that L1 is again
!> lower unit triangular, R1 upper trapezoidal, p1 a permutation,
!> and P1'*L1*R1 = P'*L*R + u*v', where v' denotes the conjugate
!> transpose of v and P is the permutation matrix corresponding
!> to p.
!> 
Parameters
[in]m
!>          m is INTEGER
!>          The number of rows of the matrix L.  m >= 0.
!> 
[in]n
!>          n is INTEGER
!>          The number of columns of the matrix R.  n >= 0.
!> 
[in,out]L
!>          L is COMPLEX array, dimension (ldl,k)
!>          On entry, the unit lower triangular matrix L.  On exit,
!>          the updated unit lower triangular matrix L1.
!> 
[in]ldl
!>          ldl is INTEGER
!>          The leading dimension of the array L.  ldl >= m.
!> 
[in,out]R
!>          R is COMPLEX array, dimension (ldr,n)
!>          On entry, the upper trapezoidal m-by-n matrix R.
!>          On exit, the updated upper trapezoidal matrix R1.
!> 
[in]ldr
!>          ldr is INTEGER
!>          The leading dimension of the array R.  ldr >= k,
!>          where k = min(m,n).
!> 
[in]p
!>          p is INTEGER array, dimension (m)
!>          The permutation vector representing the row pivoting.
!>          On exit, p is updated to reflect the new pivoting.
!> 
[in]u
!>          u is COMPLEX array, dimension (m)
!>          The left m-vector defining the rank-1 modification.
!> 
[in]v
!>          v is COMPLEX array, dimension (n)
!>          The right n-vector defining the rank-1 modification.
!> 
[out]w
!>          w is COMPLEX array, dimension (m)
!>          Workspace vector used during the update computation.
!> 

Definition at line 116 of file clup1up.f90.

◆ dlu1up()

subroutine dlu1up ( integer, intent(in) m,
integer, intent(in) n,
real(real64), dimension(ldl,*), intent(inout) l,
integer, intent(in) ldl,
real(real64), dimension(ldr,*), intent(inout) r,
integer, intent(in) ldr,
real(real64), dimension(*), intent(inout) u,
real(real64), dimension(*), intent(inout) v )

Updates an LU factorization after a rank-1 modification.

Definition:
!>       subroutine dlu1up(m,n,L,ldl,R,ldr,u,v)
!>
!>       .. Scalar Arguments ..
!>       integer            m, n, ldl, ldr
!>       ..
!>       .. Array Arguments ..
!>       double precision   L(ldl,*), R(ldr,*), u(*), v(*)
!>       ..
!> 
Purpose:
!>
!> DLU1UP updates an LU factorization after rank-1 modification.
!> Given an m-by-k lower-triangular matrix L with unit diagonal and
!> a k-by-n upper-trapezoidal matrix R, where k = min(m,n), this
!> DLU1UP updates L -> L1 and R -> R1 so that L1 is again
!> lower unit triangular, R1 upper trapezoidal, and
!> L1*R1 = L*R + u*v.', where v.' denotes the transpose of v.
!>
!> The update is performed using the Bennett algorithm with
!> column-major access, which processes the leading k-by-k block
!> first and then finishes the trailing part of R if needed.
!> 
Parameters
[in]m
!>          m is INTEGER
!>          The number of rows of the matrix L.  m >= 0.
!> 
[in]n
!>          n is INTEGER
!>          The number of columns of the matrix R.  n >= 0.
!> 
[in,out]L
!>          L is DOUBLE PRECISION array, dimension (ldl,k)
!>          On entry, the unit lower triangular matrix L.  On exit,
!>          the updated unit lower triangular matrix L1.
!> 
[in]ldl
!>          ldl is INTEGER
!>          The leading dimension of the array L.  ldl >= m.
!> 
[in,out]R
!>          R is DOUBLE PRECISION array, dimension (ldr,n)
!>          On entry, the upper trapezoidal m-by-n matrix R.
!>          On exit, the updated upper trapezoidal matrix R1.
!> 
[in]ldr
!>          ldr is INTEGER
!>          The leading dimension of the array R.  ldr >= k,
!>          where k = min(m,n).
!> 
[in,out]u
!>          u is DOUBLE PRECISION array, dimension (m)
!>          On entry, the left m-vector defining the rank-1
!>          modification.  On exit, if k < m, u is destroyed;
!>          otherwise, u contains the updated vector.
!> 
[in,out]v
!>          v is DOUBLE PRECISION array, dimension (n)
!>          On entry, the right n-vector defining the rank-1
!>          modification.  On exit, v is destroyed.
!> 

Definition at line 106 of file dlu1up.f90.

◆ dlup1up()

subroutine dlup1up ( integer, intent(in) m,
integer, intent(in) n,
real(real64), dimension(ldl,*), intent(inout) l,
integer, intent(in) ldl,
real(real64), dimension(ldr,*), intent(inout) r,
integer, intent(in) ldr,
integer, dimension(*), intent(inout) p,
real(real64), dimension(*), intent(in) u,
real(real64), dimension(*), intent(in) v,
real(real64), dimension(*), intent(out) w )

Updates a row-pivoted LU factorization after rank-1 modification.

Definition:
!>       subroutine dlup1up(m,n,L,ldl,R,ldr,p,u,v,w)
!>
!>       .. Scalar Arguments ..
!>       integer            m, n, ldl, ldr
!>       ..
!>       .. Array Arguments ..
!>       integer            p(*)
!>       double precision   L(ldl,*), R(ldr,*), u(*), v(*), w(*)
!>       ..
!> 
Purpose:
!>
!> DLUP1UP updates a row-pivoted LU factorization after rank-1
!> modification.  Given an m-by-k lower-triangular matrix L with
!> unit diagonal, a k-by-n upper-trapezoidal matrix R, and a
!> permutation vector p, where k = min(m,n), DLUP1UP
!> updates L -> L1, R -> R1 and p -> p1 so that L1 is again
!> lower unit triangular, R1 upper trapezoidal, p1 a permutation,
!> and P1.'*L1*R1 = P.'*L*R + u*v.', where v.' denotes the
!> transpose of v and P is the permutation matrix corresponding
!> to p.
!> 
Parameters
[in]m
!>          m is INTEGER
!>          The number of rows of the matrix L.  m >= 0.
!> 
[in]n
!>          n is INTEGER
!>          The number of columns of the matrix R.  n >= 0.
!> 
[in,out]L
!>          L is DOUBLE PRECISION array, dimension (ldl,k)
!>          On entry, the unit lower triangular matrix L.  On exit,
!>          the updated unit lower triangular matrix L1.
!> 
[in]ldl
!>          ldl is INTEGER
!>          The leading dimension of the array L.  ldl >= m.
!> 
[in,out]R
!>          R is DOUBLE PRECISION array, dimension (ldr,n)
!>          On entry, the upper trapezoidal m-by-n matrix R.
!>          On exit, the updated upper trapezoidal matrix R1.
!> 
[in]ldr
!>          ldr is INTEGER
!>          The leading dimension of the array R.  ldr >= k,
!>          where k = min(m,n).
!> 
[in]p
!>          p is INTEGER array, dimension (m)
!>          The permutation vector representing the row pivoting.
!>          On exit, p is updated to reflect the new pivoting.
!> 
[in]u
!>          u is DOUBLE PRECISION array, dimension (m)
!>          The left m-vector defining the rank-1 modification.
!> 
[in]v
!>          v is DOUBLE PRECISION array, dimension (n)
!>          The right n-vector defining the rank-1 modification.
!> 
[out]w
!>          w is DOUBLE PRECISION array, dimension (m)
!>          Workspace vector used during the update computation.
!> 

Definition at line 116 of file dlup1up.f90.

◆ slu1up()

subroutine slu1up ( integer, intent(in) m,
integer, intent(in) n,
real(real32), dimension(ldl,*), intent(inout) l,
integer, intent(in) ldl,
real(real32), dimension(ldr,*), intent(inout) r,
integer, intent(in) ldr,
real(real32), dimension(*), intent(inout) u,
real(real32), dimension(*), intent(inout) v )

Updates an LU factorization after a rank-1 modification.

Definition:
!>       subroutine slu1up(m,n,L,ldl,R,ldr,u,v)
!>
!>       .. Scalar Arguments ..
!>       integer            m, n, ldl, ldr
!>       ..
!>       .. Array Arguments ..
!>       real               L(ldl,*), R(ldr,*), u(*), v(*)
!>       ..
!> 
Purpose:
!>
!> SLU1UP updates an LU factorization after rank-1 modification.
!> Given an m-by-k lower-triangular matrix L with unit diagonal and
!> a k-by-n upper-trapezoidal matrix R, where k = min(m,n), this
!> SLU1UP updates L -> L1 and R -> R1 so that L1 is again
!> lower unit triangular, R1 upper trapezoidal, and
!> L1*R1 = L*R + u*v.', where v.' denotes the transpose of v.
!>
!> The update is performed using the Bennett algorithm with
!> column-major access, which processes the leading k-by-k block
!> first and then finishes the trailing part of R if needed.
!> 
Parameters
[in]m
!>          m is INTEGER
!>          The number of rows of the matrix L.  m >= 0.
!> 
[in]n
!>          n is INTEGER
!>          The number of columns of the matrix R.  n >= 0.
!> 
[in,out]L
!>          L is REAL array, dimension (ldl,k)
!>          On entry, the unit lower triangular matrix L.  On exit,
!>          the updated unit lower triangular matrix L1.
!> 
[in]ldl
!>          ldl is INTEGER
!>          The leading dimension of the array L.  ldl >= m.
!> 
[in,out]R
!>          R is REAL array, dimension (ldr,n)
!>          On entry, the upper trapezoidal m-by-n matrix R.
!>          On exit, the updated upper trapezoidal matrix R1.
!> 
[in]ldr
!>          ldr is INTEGER
!>          The leading dimension of the array R.  ldr >= k,
!>          where k = min(m,n).
!> 
[in,out]u
!>          u is REAL array, dimension (m)
!>          On entry, the left m-vector defining the rank-1
!>          modification.  On exit, if k < m, u is destroyed;
!>          otherwise, u contains the updated vector.
!> 
[in,out]v
!>          v is REAL array, dimension (n)
!>          On entry, the right n-vector defining the rank-1
!>          modification.  On exit, v is destroyed.
!> 

Definition at line 106 of file slu1up.f90.

◆ slup1up()

subroutine slup1up ( integer, intent(in) m,
integer, intent(in) n,
real(real32), dimension(ldl,*), intent(inout) l,
integer, intent(in) ldl,
real(real32), dimension(ldr,*), intent(inout) r,
integer, intent(in) ldr,
integer, dimension(*), intent(inout) p,
real(real32), dimension(*), intent(in) u,
real(real32), dimension(*), intent(in) v,
real(real32), dimension(*), intent(out) w )

Updates a row-pivoted LU factorization after rank-1 modification.

Definition:
!>       subroutine slup1up(m,n,L,ldl,R,ldr,p,u,v,w)
!>
!>       .. Scalar Arguments ..
!>       integer            m, n, ldl, ldr
!>       ..
!>       .. Array Arguments ..
!>       integer            p(*)
!>       real               L(ldl,*), R(ldr,*), u(*), v(*), w(*)
!>       ..
!> 
Purpose:
!>
!> SLUP1UP updates a row-pivoted LU factorization after rank-1
!> modification.  Given an m-by-k lower-triangular matrix L with
!> unit diagonal, a k-by-n upper-trapezoidal matrix R, and a
!> permutation vector p, where k = min(m,n), SLUP1UP
!> updates L -> L1, R -> R1 and p -> p1 so that L1 is again
!> lower unit triangular, R1 upper trapezoidal, p1 a permutation,
!> and P1.'*L1*R1 = P.'*L*R + u*v.', where v.' denotes the
!> transpose of v and P is the permutation matrix corresponding
!> to p.
!> 
Parameters
[in]m
!>          m is INTEGER
!>          The number of rows of the matrix L.  m >= 0.
!> 
[in]n
!>          n is INTEGER
!>          The number of columns of the matrix R.  n >= 0.
!> 
[in,out]L
!>          L is REAL array, dimension (ldl,k)
!>          On entry, the unit lower triangular matrix L.  On exit,
!>          the updated unit lower triangular matrix L1.
!> 
[in]ldl
!>          ldl is INTEGER
!>          The leading dimension of the array L.  ldl >= m.
!> 
[in,out]R
!>          R is REAL array, dimension (ldr,n)
!>          On entry, the upper trapezoidal m-by-n matrix R.
!>          On exit, the updated upper trapezoidal matrix R1.
!> 
[in]ldr
!>          ldr is INTEGER
!>          The leading dimension of the array R.  ldr >= k,
!>          where k = min(m,n).
!> 
[in]p
!>          p is INTEGER array, dimension (m)
!>          The permutation vector representing the row pivoting.
!>          On exit, p is updated to reflect the new pivoting.
!> 
[in]u
!>          u is REAL array, dimension (m)
!>          The left m-vector defining the rank-1 modification.
!> 
[in]v
!>          v is REAL array, dimension (n)
!>          The right n-vector defining the rank-1 modification.
!> 
[out]w
!>          w is REAL array, dimension (m)
!>          Workspace vector used during the update computation.
!> 

Definition at line 116 of file slup1up.f90.

◆ zlu1up()

subroutine zlu1up ( integer, intent(in) m,
integer, intent(in) n,
complex(real64), dimension(ldl,*), intent(inout) l,
integer, intent(in) ldl,
complex(real64), dimension(ldr,*), intent(inout) r,
integer, intent(in) ldr,
complex(real64), dimension(*), intent(inout) u,
complex(real64), dimension(*), intent(inout) v )

Updates an LU factorization after a rank-1 modification.

Definition:
!>       subroutine zlu1up(m,n,L,ldl,R,ldr,u,v)
!>
!>       .. Scalar Arguments ..
!>       integer            m, n, ldl, ldr
!>       ..
!>       .. Array Arguments ..
!>       double complex     L(ldl,*), R(ldr,*), u(*), v(*)
!>       ..
!> 
Purpose:
!>
!> ZLU1UP updates an LU factorization after rank-1 modification.
!> Given an m-by-k lower-triangular matrix L with unit diagonal and
!> a k-by-n upper-trapezoidal matrix R, where k = min(m,n), this
!> ZLU1UP updates L -> L1 and R -> R1 so that L1 is again
!> lower unit triangular, R1 upper trapezoidal, and
!> L1*R1 = L*R + u*v', where v' denotes the conjugate transpose
!> of v.
!>
!> The update is performed using the Bennett algorithm with
!> column-major access, which processes the leading k-by-k block
!> first and then finishes the trailing part of R if needed.
!> 
Parameters
[in]m
!>          m is INTEGER
!>          The number of rows of the matrix L.  m >= 0.
!> 
[in]n
!>          n is INTEGER
!>          The number of columns of the matrix R.  n >= 0.
!> 
[in,out]L
!>          L is COMPLEX*16 array, dimension (ldl,k)
!>          On entry, the unit lower triangular matrix L.  On exit,
!>          the updated unit lower triangular matrix L1.
!> 
[in]ldl
!>          ldl is INTEGER
!>          The leading dimension of the array L.  ldl >= m.
!> 
[in,out]R
!>          R is COMPLEX*16 array, dimension (ldr,n)
!>          On entry, the upper trapezoidal m-by-n matrix R.
!>          On exit, the updated upper trapezoidal matrix R1.
!> 
[in]ldr
!>          ldr is INTEGER
!>          The leading dimension of the array R.  ldr >= k,
!>          where k = min(m,n).
!> 
[in,out]u
!>          u is COMPLEX*16 array, dimension (m)
!>          On entry, the left m-vector defining the rank-1
!>          modification.  On exit, if k < m, u is destroyed;
!>          otherwise, u contains the updated vector.
!> 
[in,out]v
!>          v is COMPLEX*16 array, dimension (n)
!>          On entry, the right n-vector defining the rank-1
!>          modification.  On exit, v is destroyed.
!> 

Definition at line 107 of file zlu1up.f90.

◆ zlup1up()

subroutine zlup1up ( integer, intent(in) m,
integer, intent(in) n,
complex(real64), dimension(ldl,*), intent(inout) l,
integer, intent(in) ldl,
complex(real64), dimension(ldr,*), intent(inout) r,
integer, intent(in) ldr,
integer, dimension(*), intent(inout) p,
complex(real64), dimension(*), intent(in) u,
complex(real64), dimension(*), intent(in) v,
complex(real64), dimension(*), intent(out) w )

Updates a row-pivoted LU factorization after rank-1 modification.

Definition:
!>       subroutine zlup1up(m,n,L,ldl,R,ldr,p,u,v,w)
!>
!>       .. Scalar Arguments ..
!>       integer            m, n, ldl, ldr
!>       ..
!>       .. Array Arguments ..
!>       integer            p(*)
!>       double complex     L(ldl,*), R(ldr,*), u(*), v(*), w(*)
!>       ..
!> 
Purpose:
!>
!> ZLUP1UP updates a row-pivoted LU factorization after rank-1
!> modification.  Given an m-by-k lower-triangular matrix L with
!> unit diagonal, a k-by-n upper-trapezoidal matrix R, and a
!> permutation vector p, where k = min(m,n), ZLUP1UP
!> updates L -> L1, R -> R1 and p -> p1 so that L1 is again
!> lower unit triangular, R1 upper trapezoidal, p1 a permutation,
!> and P1'*L1*R1 = P'*L*R + u*v', where v' denotes the conjugate
!> transpose of v and P is the permutation matrix corresponding
!> to p.
!> 
Parameters
[in]m
!>          m is INTEGER
!>          The number of rows of the matrix L.  m >= 0.
!> 
[in]n
!>          n is INTEGER
!>          The number of columns of the matrix R.  n >= 0.
!> 
[in,out]L
!>          L is COMPLEX*16 array, dimension (ldl,k)
!>          On entry, the unit lower triangular matrix L.  On exit,
!>          the updated unit lower triangular matrix L1.
!> 
[in]ldl
!>          ldl is INTEGER
!>          The leading dimension of the array L.  ldl >= m.
!> 
[in,out]R
!>          R is COMPLEX*16 array, dimension (ldr,n)
!>          On entry, the upper trapezoidal m-by-n matrix R.
!>          On exit, the updated upper trapezoidal matrix R1.
!> 
[in]ldr
!>          ldr is INTEGER
!>          The leading dimension of the array R.  ldr >= k,
!>          where k = min(m,n).
!> 
[in]p
!>          p is INTEGER array, dimension (m)
!>          The permutation vector representing the row pivoting.
!>          On exit, p is updated to reflect the new pivoting.
!> 
[in]u
!>          u is COMPLEX*16 array, dimension (m)
!>          The left m-vector defining the rank-1 modification.
!> 
[in]v
!>          v is COMPLEX*16 array, dimension (n)
!>          The right n-vector defining the rank-1 modification.
!> 
[out]w
!>          w is COMPLEX*16 array, dimension (m)
!>          Workspace vector used during the update computation.
!> 

Definition at line 116 of file zlup1up.f90.