{"id":23722413,"url":"https://github.com/ibz-04/eigenv","last_synced_at":"2026-02-11T13:01:57.743Z","repository":{"id":269152197,"uuid":"897939120","full_name":"iBz-04/Eigenv","owner":"iBz-04","description":"Algorithm for finding the dominant eigenvalue and the corresponding eigenvector of a given n x n matrix - Power method","archived":false,"fork":false,"pushed_at":"2024-12-21T09:56:12.000Z","size":9,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-03T23:43:09.166Z","etag":null,"topics":["c","eigenvalues","eigenvectors","linear-algebra","matrix-calculations"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iBz-04.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-12-03T14:02:39.000Z","updated_at":"2025-05-04T19:09:16.000Z","dependencies_parsed_at":"2024-12-21T10:29:23.929Z","dependency_job_id":"ae7a78db-9e70-44c0-8bac-4423cb1d2ce9","html_url":"https://github.com/iBz-04/Eigenv","commit_stats":null,"previous_names":["ibz-04/eigenv"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/iBz-04/Eigenv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iBz-04%2FEigenv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iBz-04%2FEigenv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iBz-04%2FEigenv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iBz-04%2FEigenv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iBz-04","download_url":"https://codeload.github.com/iBz-04/Eigenv/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iBz-04%2FEigenv/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29333155,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T12:42:24.625Z","status":"ssl_error","status_checked_at":"2026-02-11T12:41:23.344Z","response_time":97,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["c","eigenvalues","eigenvectors","linear-algebra","matrix-calculations"],"created_at":"2024-12-30T23:52:03.506Z","updated_at":"2026-02-11T13:01:57.725Z","avatar_url":"https://github.com/iBz-04.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n## Overview\n\nThis is an implementation of the **Power Method**, a numerical algorithm used to find the dominant eigenvalue (largest eigenvalue in magnitude) and the corresponding eigenvector of a given square matrix. The method is iterative and relies on an initial guess vector and a tolerable error to determine convergence.\n\n---\n\n## Steps Breakdown\n\n### Step 1: Start\nThe algorithm begins execution.\n\n---\n\n### Step 2: Input\nThe following inputs are required:\n- **Order of Matrix (n):** The size of the square matrix (n × n).\n- **Tolerable Error (e):** The threshold for convergence.\n\n---\n\n### Step 3: Read Matrix (A)\nRead the elements of the matrix `A` row by row.  \nFor each element `Ai,j`:\n1. Loop through rows (`i`) from 1 to `n`.\n2. Loop through columns (`j`) from 1 to `n`.\n3. Store the values in the matrix `A`.\n\n---\n\n### Step 4: Read Initial Guess Vector (X)\nInput the initial guess for the eigenvector `X`:\n1. Loop through each element (`Xi`) of the vector from 1 to `n`.\n\n---\n\n### Step 5: Initialize\nSet the initial eigenvalue (`Lambda_Old`) to 1.\n\n---\n\n### Step 6: Multiplication (X_NEW = A * X)\nCompute the new vector `X_NEW` as the matrix-vector product of `A` and `X`:\n1. For each element `i` of the vector `X_NEW`, initialize `Temp` to 0.0.\n2. For each column `j`, compute `Temp += Ai,j * Xj`.\n3. Set `X_NEWi = Temp`.\n\n---\n\n### Step 7: Replace X by X_NEW\nUpdate the guess vector `X` with the values of `X_NEW`:\n1. For each element `i`, set `Xi = X_NEWi`.\n\n---\n\n### Step 8: Find the Largest Element (Lambda_New)\nDetermine the largest absolute value of the elements in `X`:\n1. Initialize `Lambda_New = |X1|`.\n2. Compare each subsequent element (`|Xi|`) to `Lambda_New`.\n3. If `|Xi| \u003e Lambda_New`, update `Lambda_New`.\n\n---\n\n### Step 9: Normalization\nNormalize the vector `X` by dividing each element by `Lambda_New`:\n1. For each element `i`, compute `Xi = Xi / Lambda_New`.\n\n---\n\n### Step 10: Display\nOutput the following:\n- The current dominant eigenvalue (`Lambda_New`).\n- The normalized eigenvector (`X`).\n\n---\n\n### Step 11: Check Accuracy\nVerify the convergence by checking the difference between successive eigenvalues:\n\n1. If `|Lambda_New - Lambda_Old| \u003e e`:\n   - Update `Lambda_Old = Lambda_New`.\n   - Return to **Step 6** for another iteration.\n2. Otherwise, proceed to the next step.\n\n---\n\n### Step 12: Stop\nThe algorithm terminates when convergence is achieved.\n\n---\n\n## Notes\n- **Inputs:** Ensure that the initial guess vector `X` is non-zero to avoid division errors during normalization.\n- **Convergence:** The algorithm may fail to converge if the matrix does not have a dominant eigenvalue.\n- **Usage:** This method is particularly effective for sparse or large matrices in numerical computations.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibz-04%2Feigenv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fibz-04%2Feigenv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibz-04%2Feigenv/lists"}