{"id":25839374,"url":"https://github.com/arnellebalane/matrix.js","last_synced_at":"2025-03-01T04:32:10.983Z","repository":{"id":20615708,"uuid":"23896997","full_name":"arnellebalane/matrix.js","owner":"arnellebalane","description":"JavaScript utility library for performing matrix operations","archived":false,"fork":false,"pushed_at":"2017-12-12T13:32:44.000Z","size":127,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-04-14T21:51:25.247Z","etag":null,"topics":["matrix","matrix-library","npm-package"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arnellebalane.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":"contributing.md","funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-10T23:56:03.000Z","updated_at":"2018-12-15T18:57:21.000Z","dependencies_parsed_at":"2022-07-07T17:28:01.917Z","dependency_job_id":null,"html_url":"https://github.com/arnellebalane/matrix.js","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnellebalane%2Fmatrix.js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnellebalane%2Fmatrix.js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnellebalane%2Fmatrix.js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnellebalane%2Fmatrix.js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arnellebalane","download_url":"https://codeload.github.com/arnellebalane/matrix.js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241317666,"owners_count":19943199,"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":["matrix","matrix-library","npm-package"],"created_at":"2025-03-01T04:32:10.458Z","updated_at":"2025-03-01T04:32:10.977Z","avatar_url":"https://github.com/arnellebalane.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"matrix.js\n=========\n\n![Travis CI](https://travis-ci.org/arnellebalane/matrix.js.svg?branch=master)\n\njavascript utility library for performing matrix operations\n\n#### Available Operations\n\n##### matrix.add\n\nAdds the given matrices.\n\n```javascript\nvar a = [[1, 2, 3], [4, 5, 6], [7, 8, 9]];\nvar b = [[9, 8, 7], [6, 5, 4], [3, 2, 1]];\nvar result = matrix.add(a, b);\n// result === [[10, 10, 10], [10, 10, 10], [10, 10, 10]]\n```\n\nIf one of the arguments is a scalar value, performs scalar addition.\n\n```javascript\nvar a = [[1, 2, 3], [4, 5, 6], [7, 8, 9]];\nvar result = matrix.add(3, a);\n// result === [[4, 5, 6], [7, 8, 9], [10, 11, 12]]\n```\n\n##### matrix.identity\n\nCreates an identity matrix with a given dimensions.\n\n```javascript\nvar result = matrix.identity(3);\n// result === [[1, 0, 0], [0, 1, 0], [0, 0, 1]]\n```\n\n##### matrix.multiply\n\nMultiplies the given matrices.\n\n```javascript\nvar a = [[1, 2, 3], [4, 5, 6], [7, 8, 9]];\nvar b = [[9, 8, 7], [6, 5, 4], [3, 2, 1]];\nvar result = matrix.multiply(a, b);\n// result === [[30, 24, 18], [84, 69, 54], [138, 114, 90]]\n```\n\nIf one of the arguments is a scalar value, performs scalar multiplication.\n\n```javascript\nvar a = [[1, 2, 3], [4, 5, 6], [7, 8, 9]];\nvar result = matrix.multiply(2, a);\n// result === [[2, 4, 6], [8, 10, 12], [14, 16, 18]];\n```\n\n##### matrix.ones\n\nCreates a ones matrix with the given dimensions.\n\n```javascript\nvar result = matrix.ones(3);\n// result === [[1, 1, 1], [1, 1, 1], [1, 1, 1]]\n\nvar result = matrix.ones(3, 4);\n// result === [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]\n```\n\n##### matrix.transpose\n\nTransposes the given matrix.\n\n```javascript\nvar a = [[1, 2, 3], [4, 5, 6], [7, 8, 9]];\nvar result = matrix.transpose(a);\n// result === [[1, 4, 7], [2, 5, 8], [3, 6, 9]]\n```\n\n##### matrix.valid\n\nChecks whether the given matrix is a valid matrix.\n\n```javascript\nvar a = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]\nvar result = matrix.valid(a);\n// result === true\n\nvar a = [[1, 2, 3], [4, 5], [7, 8, 9]]\nvar result = matrix.valid(a);\n// result == false\n```\n\n##### matrix.zeros\n\nCreates a zeros matrix with the given dimensions.\n\n```javascript\nvar result = matrix.zeros(3);\n// result === [[0, 0, 0], [0, 0, 0], [0, 0, 0]]\n\nvar result = matrix.zeros(3, 4);\n// result === [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farnellebalane%2Fmatrix.js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farnellebalane%2Fmatrix.js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farnellebalane%2Fmatrix.js/lists"}