-
Notifications
You must be signed in to change notification settings - Fork 6
Add tests on structured matrices #136
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
Closed
Closed
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
e4e6dd9
Structured decompression
gdalle c3a7242
Store graph in result to allow generic matrices
gdalle d5837b9
Use `fill!` whenever possible
gdalle 12dcf60
More tests
gdalle 3c1350b
Merge branch 'gd/better_result' into gd/structured
gdalle 0e9adcd
Record useless BipartiteGraph
gdalle fe178d7
Fix docs
gdalle 3937800
Fix cycling inferrability
gdalle 45b16a3
More tests
gdalle 361e53e
Add BandedMatrices
gdalle 4df06f3
Reactivate lts
gdalle 2d71688
Extras
gdalle eefd1ee
Fix LTS
gdalle e088877
Ignore unloaded Requires
gdalle de4a21a
Add BlockBandedMatrices
gdalle c743b22
Row coloring
gdalle 4f40758
Fix LTS
gdalle 116691d
No fail fast
gdalle 66acbca
BandedBlockBandedMatrices
gdalle 4c838ff
Infinite width
gdalle 59f4d42
Import
gdalle f3c3776
Fix
gdalle f55c09a
Fix version
gdalle 00b1961
Merge branch 'main' into gd/structured
gdalle ef19b99
Merge branch 'main' into gd/structured
gdalle df53bde
Merge branch 'main' into gd/structured
gdalle 7cc803a
Tests on structured matrices
gdalle 6c1d031
Remove docs
gdalle ddd7e65
No CI change
gdalle 7e48c00
Rem deps
gdalle c79c6ae
Project diff
gdalle e7fff0c
Minimize diff
gdalle 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
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,58 @@ | ||
| using ArrayInterface: ArrayInterface | ||
| using BandedMatrices: BandedMatrix, brand | ||
| using BlockBandedMatrices: BandedBlockBandedMatrix, BlockBandedMatrix | ||
| using LinearAlgebra | ||
| using SparseMatrixColorings | ||
| using Test | ||
|
|
||
| @testset "Diagonal" begin | ||
| for n in (1, 2, 10, 100) | ||
| A = Diagonal(rand(n)) | ||
| test_structured_coloring_decompression(A) | ||
| end | ||
| end; | ||
|
|
||
| @testset "Bidiagonal" begin | ||
| for n in (2, 10, 100) | ||
| A1 = Bidiagonal(rand(n), rand(n - 1), :U) | ||
| A2 = Bidiagonal(rand(n), rand(n - 1), :L) | ||
| test_structured_coloring_decompression(A1) | ||
| test_structured_coloring_decompression(A2) | ||
| end | ||
| end; | ||
|
|
||
| @testset "Tridiagonal" begin | ||
| for n in (2, 10, 100) | ||
| A = Tridiagonal(rand(n - 1), rand(n), rand(n - 1)) | ||
| test_structured_coloring_decompression(A) | ||
| end | ||
| end; | ||
|
|
||
| @testset "BandedMatrices" begin | ||
| @testset for (m, n) in [(10, 20), (20, 10)], l in 0:5, u in 0:5 | ||
| A = brand(m, n, l, u) | ||
| test_structured_coloring_decompression(A) | ||
| end | ||
| end; | ||
|
|
||
| @testset "BlockBandedMatrices" begin | ||
| for (mb, nb) in [(10, 20), (20, 10)], lb in 0:3, ub in 0:3, _ in 1:10 | ||
| rows = rand(1:5, mb) | ||
| cols = rand(1:5, nb) | ||
| A = BlockBandedMatrix{Float64}(rand(sum(rows), sum(cols)), rows, cols, (lb, ub)) | ||
| test_structured_coloring_decompression(A) | ||
| end | ||
| end; | ||
|
|
||
| @testset "BandedBlockBandedMatrices" begin | ||
| for (mb, nb) in [(10, 20), (20, 10)], lb in 0:3, ub in 0:3, _ in 1:10 | ||
| rows = rand(5:10, mb) | ||
| cols = rand(5:10, nb) | ||
| λ = rand(0:5) | ||
| μ = rand(0:5) | ||
| A = BandedBlockBandedMatrix{Float64}( | ||
| rand(sum(rows), sum(cols)), rows, cols, (lb, ub), (λ, μ) | ||
| ) | ||
| test_structured_coloring_decompression(A) | ||
| end | ||
| end; |
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To merge #132, this needs to be uncommented