-
Notifications
You must be signed in to change notification settings - Fork 198
Pivoting QR decomposition #1045
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
loiseaujc
wants to merge
31
commits into
fortran-lang:master
Choose a base branch
from
loiseaujc:rank_revealing_qr
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
98f1708
Function interface for pivoting QR.
loiseaujc 4b05928
Added interfaces for xGEQP3.
loiseaujc 0c99ca1
Fix typos in geqp3 interface definition.
loiseaujc 19cc0f0
Added handle info function for geqp3.
loiseaujc 55bc413
Full implementation of pivoting QR.
loiseaujc dd9b022
Added test for pivoting QR.
loiseaujc bd80504
Added test for a tall matrix with rank deficiency.
loiseaujc dd785a1
Added example for pivoting QR.
loiseaujc e72d2f4
Added pivoting_qr_space example.
loiseaujc bf328f6
Update test/linalg/test_linalg_pivoting_qr.fypp
loiseaujc 7454ecd
Update test/linalg/test_linalg_pivoting_qr.fypp
loiseaujc 07efc4a
Update test/linalg/test_linalg_pivoting_qr.fypp
loiseaujc 2bb062a
Clarify that GEQP3 works both for real and complex matrices.
loiseaujc e2eac02
Added specs.
loiseaujc b1f1ad0
Update src/lapack/stdlib_linalg_lapack_aux.fypp
loiseaujc 5535e3f
Update src/lapack/stdlib_linalg_lapack_aux.fypp
loiseaujc b20a054
Update example/linalg/example_pivoting_qr_space.f90
loiseaujc dffc657
Update doc/specs/stdlib_linalg.md
loiseaujc 05ae3f6
Update doc/specs/stdlib_linalg.md
loiseaujc 43d6552
Update src/stdlib_linalg.fypp
loiseaujc 81f2a4f
Apply suggestions from code review
loiseaujc 99abc23
Split tests based on matrix types.
loiseaujc 61d9101
Fypp-template for the *geqp3 interfaces.
loiseaujc b7a4475
Further simplification of the interface fyyp-template.
loiseaujc c2fbf36
Debug ubuntu-22.04/cmake/intel-classic
loiseaujc a2da4ce
Debugging intel classic
loiseaujc 804db82
Debug intel classic
loiseaujc 79cba85
Debugging intel
loiseaujc 8df20ab
Debug intel-classic. Change error metric.
loiseaujc 189b81e
Revert "Further simplification of the interface fyyp-template."
loiseaujc 2797b65
Revert "Debug ubuntu-22.04/cmake/intel-classic"
loiseaujc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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,16 @@ | ||
| program example_pivoting_qr | ||
| use stdlib_linalg, only: qr | ||
| implicit none | ||
| real :: A(104, 32), Q(104, 32), R(32, 32) | ||
| integer :: pivots(32) | ||
|
|
||
| ! Create a random matrix | ||
| call random_number(A) | ||
|
|
||
| ! Compute its QR factorization (reduced) | ||
| call qr(A, Q, R, pivots) | ||
|
|
||
| ! Test factorization: Q*R = A | ||
| print *, maxval(abs(matmul(Q, R) - A(:, pivots))) | ||
|
|
||
| end program example_pivoting_qr |
This file contains hidden or 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,25 @@ | ||
| ! Pivoting QR example with pre-allocated storage | ||
| program example_pivoting_qr_space | ||
| use stdlib_linalg_constants, only: ilp | ||
| use stdlib_linalg, only: qr, qr_space, linalg_state_type | ||
| implicit none | ||
| real :: A(104, 32), Q(104, 32), R(32, 32) | ||
| real, allocatable :: work(:) | ||
| integer(ilp) :: lwork, pivots(32) | ||
| type(linalg_state_type) :: err | ||
|
|
||
| ! Create a random matrix | ||
| call random_number(A) | ||
|
|
||
| ! Prepare QR workspace | ||
| call qr_space(A, lwork, pivoting=.true.) | ||
| allocate (work(lwork)) | ||
|
|
||
| ! Compute its QR factorization (reduced) | ||
| call qr(A, Q, R, pivots, storage=work, err=err) | ||
|
|
||
| ! Test factorization: Q*R = A | ||
| print *, maxval(abs(matmul(Q, R) - A(:, pivots))) | ||
| print *, err%print() | ||
|
|
||
| end program example_pivoting_qr_space |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.