{"id":15782015,"url":"https://github.com/BeyzaKomish/Matrix-Multiplication-Project","last_synced_at":"2025-03-14T08:32:45.701Z","repository":{"id":247240542,"uuid":"825345983","full_name":"BeyzaKomish/Matrix-Multiplication-Project","owner":"BeyzaKomish","description":"This C++ program performs matrix manipulation by implementing a custom matrix operation on an input matrix  B and a core matrix C. The result is stored in the output matrix A.","archived":false,"fork":false,"pushed_at":"2024-07-07T15:05:54.000Z","size":902,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-30T23:25:06.436Z","etag":null,"topics":["2d-dynamic-arrays","2darrays","cpp","dynamic-arrays","dynamically","matrix-calculations","matrix-multiplication","multi-dimensional-array","multiarray"],"latest_commit_sha":null,"homepage":"","language":"C++","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/BeyzaKomish.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":"2024-07-07T14:27:55.000Z","updated_at":"2024-07-07T15:05:57.000Z","dependencies_parsed_at":"2024-07-07T15:48:15.564Z","dependency_job_id":"3233ae52-6fe3-460c-b86c-8b6da1632fa4","html_url":"https://github.com/BeyzaKomish/Matrix-Multiplication-Project","commit_stats":null,"previous_names":["aloramercer/matrix-multiplication-project","beyzakomish/matrix-multiplication-project"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BeyzaKomish%2FMatrix-Multiplication-Project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BeyzaKomish%2FMatrix-Multiplication-Project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BeyzaKomish%2FMatrix-Multiplication-Project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BeyzaKomish%2FMatrix-Multiplication-Project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BeyzaKomish","download_url":"https://codeload.github.com/BeyzaKomish/Matrix-Multiplication-Project/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243547651,"owners_count":20308749,"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":["2d-dynamic-arrays","2darrays","cpp","dynamic-arrays","dynamically","matrix-calculations","matrix-multiplication","multi-dimensional-array","multiarray"],"created_at":"2024-10-04T19:02:26.850Z","updated_at":"2025-03-14T08:32:45.233Z","avatar_url":"https://github.com/BeyzaKomish.png","language":"C++","readme":"# Matrix Operation Program\n\n## Overview\nThis program performs a custom matrix operation \\( A = B \\unicode{x2218} C \\) where:\n- \\( B \\) is a randomly generated square input matrix.\n- \\( C \\) is a randomly generated square core matrix.\n- \\( A \\) is the resulting output matrix after performing the operation.\n\n## Custom Operation \n1. **Initial Setup**: \n   - The core matrix \\( C \\) is aligned with the top-left corner of the input matrix \\( B \\).\n   - Elements of \\( C \\) are multiplied by corresponding elements in \\( B \\).\n   - The sum of these products is written to the corresponding cell in the result matrix \\( A \\).\n\n2. **Shifting and Calculating**:\n   - Shift \\( C \\) one cell to the right and repeat the multiplication and summing process.\n   - Continue until \\( C \\) reaches the end of the current row.\n   - Move \\( C \\) to the beginning of the next row and repeat until the entire input matrix \\( B \\) is processed.\n\n3. **Output Matrix Size**:\n   - The size of the output matrix \\( A \\) is calculated as:\n     \n     \\[ \\text{output\\_row\\_size} = (\\text{input\\_row\\_size} - \\text{core\\_row\\_size}) + 1 \\]\n\n## Requirements\n- **Dynamic Allocation**: Matrices must be declared dynamically.\n- **Random Generation**:\n  - Input matrix \\( B \\): Size between 5x5 and 20x20, values between 10-20.\n  - Core matrix \\( C \\): Size between 2x2 and 5x5, values between 1-10.\n- **Menu Options**:\n  1. Generate new matrices and store in \"data.txt\".\n  2. Read matrices from \"data.txt\".\n\n## Usage\n1. **Compile the Program**:\n   ```sh\n   g++ -o matrix_operation matrix_operation.cpp\n## Example File Format (data.txt)\n   ```sh\ninput matrix\n10 12 15 14 20\n11 19 16 18 17\n14 15 10 13 16\n12 13 18 20 15\n11 17 16 15 19\ncore matrix\n5 7\n8 4\n```\n## Example File Format (data.txt)\n   ```sh\nPress 1-To generate new matrix or press 2-To read the matrices\n1\nThe Output Matrix:\n8 7 6 5\n9 8 7 6\n10 9 8 7\n11 10 9 8\n```\n\n## Additional Information\n* https://www.codespeedy.com/how-to-dynamically-allocate-a-2d-array-in-cpp/\n* https://www.techiedelight.com/dynamic-memory-allocation-in-c-for-2d-3d-array/\n* https://www.guru99.com/cpp-dynamic-array.html\n* https://stackoverflow.com/questions/936687/how-do-i-declare-a-2d-array-in-c-using-new\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBeyzaKomish%2FMatrix-Multiplication-Project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FBeyzaKomish%2FMatrix-Multiplication-Project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBeyzaKomish%2FMatrix-Multiplication-Project/lists"}