{"id":28452720,"url":"https://github.com/juliasmoothoptimizers/suitesparsematrixcollection.jl","last_synced_at":"2025-06-27T23:31:19.570Z","repository":{"id":43800666,"uuid":"171373091","full_name":"JuliaSmoothOptimizers/SuiteSparseMatrixCollection.jl","owner":"JuliaSmoothOptimizers","description":"A straightforward interface to the SuiteSparse Matrix Collection","archived":false,"fork":false,"pushed_at":"2025-03-01T23:08:39.000Z","size":1876,"stargazers_count":10,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-06T18:12:29.078Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JuliaSmoothOptimizers.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.bib","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-18T23:46:02.000Z","updated_at":"2025-03-01T23:06:26.000Z","dependencies_parsed_at":"2024-12-13T15:19:25.089Z","dependency_job_id":"850a2f38-f4e4-40d4-85a5-eb183f47fdcb","html_url":"https://github.com/JuliaSmoothOptimizers/SuiteSparseMatrixCollection.jl","commit_stats":{"total_commits":78,"total_committers":9,"mean_commits":8.666666666666666,"dds":0.5512820512820513,"last_synced_commit":"1344b8940b43d23881c3c30f39903953b33ce7a6"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/JuliaSmoothOptimizers/SuiteSparseMatrixCollection.jl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaSmoothOptimizers%2FSuiteSparseMatrixCollection.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaSmoothOptimizers%2FSuiteSparseMatrixCollection.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaSmoothOptimizers%2FSuiteSparseMatrixCollection.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaSmoothOptimizers%2FSuiteSparseMatrixCollection.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JuliaSmoothOptimizers","download_url":"https://codeload.github.com/JuliaSmoothOptimizers/SuiteSparseMatrixCollection.jl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaSmoothOptimizers%2FSuiteSparseMatrixCollection.jl/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262351462,"owners_count":23297626,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-06T18:12:29.156Z","updated_at":"2025-06-27T23:31:19.561Z","avatar_url":"https://github.com/JuliaSmoothOptimizers.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SuiteSparseMatrixCollection.jl\n\n| **Documentation** | **Linux/macOS/Windows/FreeBSD** | **Coverage** | **DOI** |\n|:-----------------:|:-------------------------------:|:------------:|:-------:|\n| [![docs-stable][docs-stable-img]][docs-stable-url] [![docs-dev][docs-dev-img]][docs-dev-url] | [![build-gh][build-gh-img]][build-gh-url] [![build-cirrus][build-cirrus-img]][build-cirrus-url] | [![codecov][codecov-img]][codecov-url] | [![doi][doi-img]][doi-url] |\n\n[docs-stable-img]: https://img.shields.io/badge/docs-stable-blue.svg\n[docs-stable-url]: https://JuliaSmoothOptimizers.github.io/SuiteSparseMatrixCollection.jl/stable\n[docs-dev-img]: https://img.shields.io/badge/docs-dev-purple.svg\n[docs-dev-url]: https://JuliaSmoothOptimizers.github.io/SuiteSparseMatrixCollection.jl/dev\n[build-gh-img]: https://github.com/JuliaSmoothOptimizers/SuiteSparseMatrixCollection.jl/workflows/CI/badge.svg?branch=main\n[build-gh-url]: https://github.com/JuliaSmoothOptimizers/SuiteSparseMatrixCollection.jl/actions\n[build-cirrus-img]: https://img.shields.io/cirrus/github/JuliaSmoothOptimizers/SuiteSparseMatrixCollection.jl?logo=Cirrus%20CI\n[build-cirrus-url]: https://cirrus-ci.com/github/JuliaSmoothOptimizers/SuiteSparseMatrixCollection.jl\n[codecov-img]: https://codecov.io/gh/JuliaSmoothOptimizers/SuiteSparseMatrixCollection.jl/branch/main/graph/badge.svg\n[codecov-url]: https://app.codecov.io/gh/JuliaSmoothOptimizers/SuiteSparseMatrixCollection.jl\n[doi-img]: https://img.shields.io/badge/DOI-10.5281%2Fzenodo.4324340-blue.svg\n[doi-url]: https://doi.org/10.5281/zenodo.4324340\n\nA straightforward interface to the [SuiteSparse Matrix Collection](https://sparse.tamu.edu/).\n\n## References\n\n\u003e Davis, Timothy A. and Hu, Yifan (2011).\n\u003e The University of Florida sparse matrix collection.\n\u003e ACM Transactions on Mathematical Software, 38(1), 1--25.\n\u003e [10.1145/2049662.2049663](https://doi.org/10.1145/2049662.2049663)\n\n## How to Cite\n\nIf you use SuiteSparseMatrixCollection.jl in your work, please cite using the format given in [CITATION.bib](https://github.com/JuliaSmoothOptimizers/SuiteSparseMatrixCollection.jl/blob/main/CITATION.bib).\n\n## How to install\n\n```julia\npkg\u003e add SuiteSparseMatrixCollection\npkg\u003e test SuiteSparseMatrixCollection\n```\n\n## Updating the database\n\nClone this repository, activate the `utils` environment and run `gen_db.jl` to check if the database needs to be updated.\n\n## Updating `Artifacts.toml`\n\nClone this repository, activate the `utils` environment and run `gen_artifacts.jl` to check if `Artifacts.toml` needs to be updated.\n\n## Examples\n\n```julia\njulia\u003e using SuiteSparseMatrixCollection\n\njulia\u003e # name-based selection can be done with `ssmc_matrices()`\njulia\u003e ssmc = ssmc_db()\njulia\u003e ssmc_matrices(ssmc, \"HB\", \"bcsstk\")  # all matrices whose group contains \"HB\" and name contains \"bcsstk\"\njulia\u003e ssmc_matrices(ssmc, \"\", \"bcsstk\")    # all matrices whose name contains \"bcsstk\"\njulia\u003e ssmc_matrices(ssmc, \"HB\", \"\")        # all matrices whose group contains \"HB\"\n\njulia\u003e # select symmetric positive definite matrices with ≤ 100 rows and columns\njulia\u003e tiny = ssmc[(ssmc.numerical_symmetry .== 1) .\u0026 (ssmc.positive_definite.== true) .\u0026\n                   (ssmc.real .== true) .\u0026 (ssmc.nrows .≤ 100), :]\n\njulia\u003e # fetch the matrices selects in MatrixMarket format\njulia\u003e paths = fetch_ssmc(tiny, format=\"MM\")   # matrices are downloaded in paths\njulia\u003e downloaded_matrices = installed_ssmc()  # name of all downloaded matrices\njulia\u003e delete_ssmc(\"HB\", \"bcsstk02\")           # delete the matrix \"bcsstk02\" of group \"HB\"\njulia\u003e delete_all_ssmc()                       # delete all matrices from the SuiteSparseMatrixCollection\n```\n\nMatrices are available in formats:\n\n* `\"RB\"`: the [Rutherford-Boeing format](https://www.cise.ufl.edu/research/sparse/matrices/DOC/rb.pdf);\n* `\"MM\"`: the [MatrixMarket format](http://math.nist.gov/MatrixMarket/formats.html#MMformat).\n\nUse `DataFrames` syntax to further examine a list of selected matrices:\n```julia\njulia\u003e tiny[!, [:name, :nrows, :ncols, :positive_definite, :lower_bandwidth]]\n12×5 DataFrame\n│ Row │ name          │ nrows │ ncols │ positive_definite │ lower_bandwidth │\n│     │ String        │ Int64 │ Int64 │ Bool              │ Int64           │\n├─────┼───────────────┼───────┼───────┼───────────────────┼─────────────────┤\n│ 1   │ bcsstk01      │ 48    │ 48    │ 1                 │ 35              │\n│ 2   │ bcsstk02      │ 66    │ 66    │ 1                 │ 65              │\n│ 3   │ bcsstm02      │ 66    │ 66    │ 1                 │ 0               │\n│ 4   │ nos4          │ 100   │ 100   │ 1                 │ 13              │\n│ 5   │ ex5           │ 27    │ 27    │ 1                 │ 20              │\n│ 6   │ mesh1e1       │ 48    │ 48    │ 1                 │ 47              │\n│ 7   │ mesh1em1      │ 48    │ 48    │ 1                 │ 47              │\n│ 8   │ mesh1em6      │ 48    │ 48    │ 1                 │ 47              │\n│ 9   │ LF10          │ 18    │ 18    │ 1                 │ 3               │\n│ 10  │ LFAT5         │ 14    │ 14    │ 1                 │ 5               │\n│ 11  │ Trefethen_20b │ 19    │ 19    │ 1                 │ 16              │\n│ 12  │ Trefethen_20  │ 20    │ 20    │ 1                 │ 16              │\n```\n\nMatrices in Rutherford-Boeing format can be opened with [`HarwellRutherfordBoeing.jl`](https://github.com/JuliaSparse/HarwellRutherfordBoeing.jl):\n```julia\npkg\u003e add HarwellRutherfordBoeing\n\njulia\u003e using HarwellRutherfordBoeing\n\njulia\u003e matrix = ssmc[ssmc.name .== \"bcsstk01\", :]\n1×30 DataFrame. Omitted printing of 17 columns\n│ Row │ group  │ nnzdiag │ nrows │ numerical_symmetry │ amd_vnz │ binary │ structural_rank │ is_nd │ is_graph │ RB_type │ lower_bandwidth │ explicit_zeros │ amd_flops │\n│     │ String │ Int64   │ Int64 │ Float64            │ Int64   │ Bool   │ Int64           │ Bool  │ Bool     │ String  │ Int64           │ Int64          │ Float64   │\n├─────┼────────┼─────────┼───────┼────────────────────┼─────────┼────────┼─────────────────┼───────┼──────────┼─────────┼─────────────────┼────────────────┼───────────┤\n│ 1   │ HB     │ 48      │ 48    │ 1.0                │ 651     │ 0      │ 48              │ 1     │ 0        │ rsa     │ 35              │ 0              │ 6009.0    │\n\njulia\u003e path = fetch_ssmc(matrix, format=\"RB\")\n1-element Array{String,1}:\n \"/Users/dpo/dev/JSO/SuiteSparseMatrixCollection.jl/src/../data/RB/HB/bcsstk01\"\n\njulia\u003e A = RutherfordBoeingData(joinpath(path[1], \"$(matrix.name[1]).rb\"))\nRutherford-Boeing data 23 of type rsa\n48 rows, 48 cols, 224 nonzeros\n```\n\nMatrices in MM format can be opened with [`MatrixMarket.jl`](https://github.com/JuliaSparse/MatrixMarket.jl).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuliasmoothoptimizers%2Fsuitesparsematrixcollection.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuliasmoothoptimizers%2Fsuitesparsematrixcollection.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuliasmoothoptimizers%2Fsuitesparsematrixcollection.jl/lists"}