{"id":25301626,"url":"https://github.com/p2js/mat-rs","last_synced_at":"2025-10-20T12:13:09.083Z","repository":{"id":217452700,"uuid":"743950665","full_name":"p2js/mat-rs","owner":"p2js","description":"no_std implementation of mathematical matrix types in Rust","archived":false,"fork":false,"pushed_at":"2024-01-16T10:48:18.000Z","size":14,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-16T06:56:45.417Z","etag":null,"topics":["determinant-calculation","matrices","matrix","matrix-library","rust"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/mat-rs","language":"Rust","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/p2js.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}},"created_at":"2024-01-16T10:31:30.000Z","updated_at":"2024-11-17T09:56:14.000Z","dependencies_parsed_at":"2024-01-16T15:32:09.380Z","dependency_job_id":null,"html_url":"https://github.com/p2js/mat-rs","commit_stats":null,"previous_names":["p2js/mat-rs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p2js%2Fmat-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p2js%2Fmat-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p2js%2Fmat-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p2js%2Fmat-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/p2js","download_url":"https://codeload.github.com/p2js/mat-rs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238610551,"owners_count":19500674,"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":["determinant-calculation","matrices","matrix","matrix-library","rust"],"created_at":"2025-02-13T06:48:11.092Z","updated_at":"2025-10-20T12:13:08.992Z","avatar_url":"https://github.com/p2js.png","language":"Rust","readme":"# mat-rs\n\nA `no_std` implementation of mathematical matrix types in rust\n\n## ⚠️ WIP\n\nThis library is functional, but not done. There are a couple of things on the to-do list:\n\n- Implement the `to_inverse` (if even possible) and `inverse` methods for DMat\n- Add doc comments for types and operations\n- Add one-way interoperability between DMat and Mat (possibly through a common Matrix trait)\n\n## Features\n\nThis library crate implements two types of matrices:\n\n- `Mat\u003cR, C\u003e`, statically sized matrix types using const generics\n- `DMat`, a dynamically sized matrix type\n\nBoth of the matrix variants store `f64` values internally.\n\n## Usage\n\nMatrices can be initialised using the provided `mat![]` and `dmat![]` macros, or using some of the types' provided functions:\n\n```rs\nuse mat_rs::mat::{mat, Mat};\n\nlet a = mat![\n    1, 2, 3;\n    4, 5, 6;\n    7, 8, 9\n]; //the type will be automatically inferred as Mat\u003c3, 3\u003e\n\nlet b = Mat::\u003c3, 3\u003e::identity(); //3x3 identity matrix\n\nassert_eq(a*b, a);\nprintln!(\"{}\", a.determinant()); //0\n```\n\n## Operations\n\nFor the statically sized `Mat`s, operations are defined only on valid corresponding types.\nFor example, `Mat\u003cR, C\u003e::add` will be defined only on matrices of the same size.\n\nThis also applies to commutative matrices for multiplication, and operations that are only valid on square matrices like determinants and inverses.\n\nDynamic matrices will currently panic on invalid operations, so it's up to the implementer to verify sizes if necessary before performing operations.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp2js%2Fmat-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fp2js%2Fmat-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp2js%2Fmat-rs/lists"}