{"id":22820856,"url":"https://github.com/gha3mi/forsvd","last_synced_at":"2026-01-07T18:43:38.124Z","repository":{"id":180076429,"uuid":"656861000","full_name":"gha3mi/forsvd","owner":"gha3mi","description":"ForSVD - A Fortran library for singular value decompostion (SVD) calculation, low-rank approximation, and image compression.","archived":false,"fork":false,"pushed_at":"2023-12-28T12:55:12.000Z","size":1656,"stargazers_count":2,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-06T04:51:27.400Z","etag":null,"topics":["fortran","fortran-package-manager","image-compression","low-rank-approximation","singular-value-decomposition","svd"],"latest_commit_sha":null,"homepage":"https://gha3mi.github.io/forsvd/","language":"Fortran","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gha3mi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-21T19:48:06.000Z","updated_at":"2024-05-10T22:21:09.000Z","dependencies_parsed_at":"2023-12-28T13:55:14.648Z","dependency_job_id":"39a83751-9178-4858-8760-3edb65d22f4d","html_url":"https://github.com/gha3mi/forsvd","commit_stats":null,"previous_names":["gha3mi/forsvd"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gha3mi%2Fforsvd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gha3mi%2Fforsvd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gha3mi%2Fforsvd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gha3mi%2Fforsvd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gha3mi","download_url":"https://codeload.github.com/gha3mi/forsvd/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246392342,"owners_count":20769722,"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":["fortran","fortran-package-manager","image-compression","low-rank-approximation","singular-value-decomposition","svd"],"created_at":"2024-12-12T15:42:39.100Z","updated_at":"2026-01-07T18:43:38.095Z","avatar_url":"https://github.com/gha3mi.png","language":"Fortran","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![GitHub](https://img.shields.io/badge/GitHub-ForSVD-blue.svg?style=social\u0026logo=github)](https://github.com/gha3mi/forsvd)\n[![Version](https://img.shields.io/github/release/gha3mi/forsvd.svg)](https://github.com/gha3mi/forsvd/releases/latest)\n[![Documentation](https://img.shields.io/badge/ford-Documentation%20-blueviolet.svg)](https://gha3mi.github.io/forsvd/)\n[![License](https://img.shields.io/github/license/gha3mi/forsvd?color=green)](https://github.com/gha3mi/forsvd/blob/main/LICENSE)\n[![Build](https://github.com/gha3mi/forsvd/actions/workflows/ci.yml/badge.svg)](https://github.com/gha3mi/forsvd/actions/workflows/ci.yml)\n\n\u003cimg alt=\"ForSVD\" src=\"https://github.com/gha3mi/forsvd/raw/main/media/logo.png\" width=\"750\"\u003e\n\n**ForSVD**: A Fortran library for singular value decomposition (SVD) calculation, low-rank approximation, and image compression.\n\n## fpm dependency\n\nIf you want to use `ForSVD` as a dependency in your own fpm project,\nyou can easily include it by adding the following line to your `fpm.toml` file:\n\n```toml\n[dependencies]\nforsvd = {git=\"https://github.com/gha3mi/forsvd.git\"}\n```\n\n## How to run tests\n\n**Reuirements:**\n\nFortran Compiler, LAPACK or MKL Libraries\n\n**Clone the repository:**\n\nYou can clone the `ForSVD` repository from GitHub using the following command:\n\n```shell\ngit clone https://github.com/gha3mi/forsvd.git\n```\n\n```shell\ncd forsvd\n```\n\n**Intel Fortran Compiler (ifort)**\n\n```shell\nfpm @ifort-test\n```\n**Intel Fortran Compiler (ifx)**\n\n```shell\nfpm @ifx-test\n```\n\n**GNU Fortran Compiler (gfortran)**\n\n```shell\nfpm @gfortran-test\n```\n\n**NVIDIA Compiler (nvfortran)**\n\n```shell\nfpm @nvfortran-test\n```\n\n## Usage (SVD)\n\n```Fortran\nuse forsvd, only: svd\n\ncall svd(A, U,S,VT, method='gesvd') ! method='gesdd' \n```\n\n### Example 1\n\n```fortran\nprogram example1\n\n   use kinds\n   use forsvd, only: svd\n\n   implicit none\n\n   real(rk), dimension(:, :), allocatable :: A, U, VT\n   real(rk), dimension(:),    allocatable :: S\n   integer                                :: m, n, i, j\n\n   m = 4\n   n = 3\n\n   allocate(A(m,n), U(m,m), S(min(m,n)), VT(n,n))\n\n   call random_number(A)\n   A = A*10.0_rk\n\n   call svd(A, U,S,VT)\n\n   ! Print U\n   print *, \"U:\"\n   print \"(4F10.6)\", (U(:,j), j = 1, m)\n\n   ! Print S\n   print *, \"S:\"\n   print \"(3F10.6)\", S\n\n   ! Print VT\n   print *, \"VT:\"\n   print \"(3F10.6)\", (VT(:,j), j = 1, n)\n\n   deallocate(A, U, S, VT)\n\nend program example1\n```\n\n## Usage (low-rank approximation)\n\n```Fortran\nuse forsvd, only: tsvd\n\ncall ts%lowrank(matrix=A, rank=n)\n```\n\n### Example 2\n\n```fortran\nprogram example2\n\n   use kinds\n   use forsvd, only: tsvd\n\n   implicit none\n\n   real(rk), dimension(:,:), allocatable :: A\n   type(tsvd)                            :: ts\n\n   allocate(A(50,20))\n   call random_number(A)\n   A = A*100.0_rk\n\n   call ts%lowrank(matrix=A, rank=10)\n\n   print*, norm2(A - ts%matrix_app)/norm2(A)\n   \n   call ts%dlloc()\n\nend program example2\n```\n\n## API documentation\n\nThe most up-to-date API documentation for the master branch is available\n[here](https://gha3mi.github.io/forsvd/).\nTo generate the API documentation for `ForSVD` using\n[ford](https://github.com/Fortran-FOSS-Programmers/ford) run the following\ncommand:\n\n```shell\nford ford.yml\n```\n\n## Contributing\n\nContributions to `ForSVD` are welcome!\nIf you find any issues or would like to suggest improvements, please open an issue.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgha3mi%2Fforsvd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgha3mi%2Fforsvd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgha3mi%2Fforsvd/lists"}