Skip to content
Update and solve routines for "Q-less" QR factorization.
Julia
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Update residual after iterative refinement. Jan 20, 2016
test
.gitignore
.travis.yml
LICENSE.md
README.md
REQUIRE
appveyor.yml

README.md

QRupdate

Build Status codecov.io

Update the "Q-less" QR factorization of a matrix. Routines are provided for adding and deleting columns, adding rows, and solving the least-squares systems.

Installing

Pkg.clone("https://github.com/mpf/QRupdate.jl.git")
Pkg.test("QRupdate")

Examples

Adding columns

Build the "Q-less" QR factorization of A one column at a time.

m, n = 100, 50
A = randn(m,0)
R = Array{Float64}(0,0)
for i in 1:n
    a = randn(m)
    R = qraddcol(A, R, a)
    A = [A a]
end

Solve a least-squares problem using R.

b = randn(m)
x, r = csne(R, A, b)

Deleting columns

Delete a column and compute new R.

n = size(A,2)
k = rand(1:n)
A = A[:, 1:n .!= k]
R = qrdelcol(R, k)

Solve a least-squares problem using R.

x, r = csne(R, A, b)

Adding rows

Add a row to A.

n = size(A,2)
a = randn(n)'  # must be row vector
A = [A; a]
R = qraddrow(R, a)

Solve a least-squares problem using R.

b = [b; randn()]
x, r = csne(R, A, b)

Reference

Björck, A. (1996). Numerical methods for least squares problems. SIAM.

You can’t perform that action at this time.