-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 979a073
Showing
8 changed files
with
712 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
*~ | ||
*.jl.cov | ||
*.jl.*.cov | ||
*.jl.mem | ||
/deps/deps.jl | ||
/docs/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
## Documentation: http://docs.travis-ci.com/user/languages/julia/ | ||
language: julia | ||
os: | ||
- linux | ||
- osx | ||
julia: | ||
- 1.0 | ||
- nightly | ||
notifications: | ||
email: false | ||
git: | ||
depth: 99999999 | ||
|
||
## uncomment the following lines to allow failures on nightly julia | ||
## (tests will run but not make your overall status red) | ||
#matrix: | ||
# allow_failures: | ||
# - julia: nightly | ||
|
||
## uncomment following lines to deploy documentation | ||
# jobs: | ||
# include: | ||
# - stage: Documentation | ||
# julia: 1.0 | ||
# os: linux | ||
# script: | ||
# - julia --project=docs -e 'using Pkg; Pkg.instantiate(); Pkg.develop(PackageSpec(path=pwd()))' | ||
# - julia --project=docs --color=yes docs/make.jl | ||
# after_success: skip | ||
after_success: | ||
- julia --project=test/coverage -e 'using Pkg; Pkg.instantiate()' | ||
- julia --project=test/coverage test/coverage/coverage.jl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
The IterativeRefinement.jl package is licensed under the MIT "Expat" License: | ||
|
||
> Copyright (c) 2018: the IterativeRefinement.jl developers | ||
> | ||
> Permission is hereby granted, free of charge, to any person obtaining a copy | ||
> of this software and associated documentation files (the "Software"), to deal | ||
> in the Software without restriction, including without limitation the rights | ||
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
> copies of the Software, and to permit persons to whom the Software is | ||
> furnished to do so, subject to the following conditions: | ||
> | ||
> The above copyright notice and this permission notice shall be included in all | ||
> copies or substantial portions of the Software. | ||
> | ||
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
> SOFTWARE. | ||
> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# IterativeRefinement | ||
<!-- | ||
![Lifecycle](https://img.shields.io/badge/lifecycle-experimental-orange.svg) --> | ||
![Lifecycle](https://img.shields.io/badge/lifecycle-maturing-blue.svg)<!-- | ||
![Lifecycle](https://img.shields.io/badge/lifecycle-stable-green.svg) | ||
![Lifecycle](https://img.shields.io/badge/lifecycle-retired-orange.svg) | ||
![Lifecycle](https://img.shields.io/badge/lifecycle-archived-red.svg) | ||
![Lifecycle](https://img.shields.io/badge/lifecycle-dormant-blue.svg) --> | ||
[![Build Status](https://travis-ci.com/RalphAS/IterativeRefinement.jl.svg?branch=master)](https://travis-ci.com/RalphAS/IterativeRefinement.jl) | ||
[![codecov.io](http://codecov.io/github/RalphAS/IterativeRefinement.jl/coverage.svg?branch=master)](http://codecov.io/github/RalphAS/IterativeRefinement.jl?branch=master) | ||
|
||
This package is an implementation of multi-precision iterative refinement for | ||
linear matrix-vector problems of the form `A x = b`. | ||
|
||
# Basic Usage | ||
```julia | ||
julia> using LinearAlgebra, IterativeRefinement | ||
julia> x, bnorm, bcomp = rfldiv(A,b) | ||
``` | ||
This provides an accurate solution vector `x` and estimated bounds | ||
onf norm-wise and component-wise relative error. By default `LU` decomposition | ||
is used. | ||
|
||
# Advanced Usage | ||
See the function docstring for details. | ||
|
||
If one has several right-hand-sides, one can equilibrate and factor | ||
`A` in advance; see the tests for an example. | ||
|
||
# Background | ||
The purpose of iterative refinement is to improve the accuracy of a | ||
solution. If `x` is the exact solution, a simple solve of the form | ||
`y = A \ b` will have a relative forward error (`norm(y-x)/norm(x)`) of | ||
approximately `ϵ * O(n) * cond(A)` where `ϵ` is the unit roundoff error | ||
in the standard precision. Iterative refinement with higher precision | ||
residuals can reduce this to `ϵ * O(n)`, as long as the matrix `A` is | ||
not very badly conditioned relative to `ϵ`. | ||
|
||
Why not do everything in high precision? The factorization step is | ||
typically *much* more expensive in high precision, whereas the | ||
residual computation is relatively cheap. Furthermore, this scheme | ||
provides useful error bounds. | ||
|
||
For typical use, one would have a working precision of `Float64` | ||
(`ϵ = 2.2e-16`), so that fast LAPACK/BLAS routines dominate the runtime. | ||
`rfldiv` will then use `Double64` from | ||
[DoubleFloats.jl](https://github.com/JuliaMath/DoubleFloats.jl) | ||
for the residuals. | ||
|
||
# Reference | ||
To be precise, this package implements Algorithm 3 from J.Demmel et al., | ||
"Error bounds from extra precise iterative refinement", | ||
LAPACK Working Note Nr. 165 (2005), also published as | ||
ACM TOMS, 32, 325 (2006). The work | ||
described therein eventually turned into a collection of subroutines | ||
included in some versions of LAPACK. This implementation is based on | ||
the paper; minor modifications were introduced based on experimentation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
julia 0.7 | ||
DoubleFloats 0.4 |
Oops, something went wrong.