{"id":24227522,"url":"https://github.com/emrekz/emx","last_synced_at":"2025-08-01T17:09:30.704Z","repository":{"id":272144958,"uuid":"915651189","full_name":"emrekz/emx","owner":"emrekz","description":"Small header-only C library for matrix operations","archived":false,"fork":false,"pushed_at":"2025-01-18T15:12:40.000Z","size":23,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-04T06:14:24.685Z","etag":null,"topics":["c","matrix","matrix-library"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/emrekz.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":"2025-01-12T12:52:58.000Z","updated_at":"2025-01-18T15:12:42.000Z","dependencies_parsed_at":"2025-01-12T14:23:44.995Z","dependency_job_id":"b44b87f5-cbe7-4c48-8253-969827d523b5","html_url":"https://github.com/emrekz/emx","commit_stats":null,"previous_names":["emrekz/emx"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/emrekz/emx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emrekz%2Femx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emrekz%2Femx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emrekz%2Femx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emrekz%2Femx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emrekz","download_url":"https://codeload.github.com/emrekz/emx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emrekz%2Femx/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268265829,"owners_count":24222525,"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","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","matrix","matrix-library"],"created_at":"2025-01-14T10:18:08.838Z","updated_at":"2025-08-01T17:09:30.678Z","avatar_url":"https://github.com/emrekz.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# emx - C Library for Basic Matrix Operation\nIt is a small header-only C library which can perform basic operations for matrix\n## Functions\n*Definitions for function parameters are in doxgyen comments*\n```c\nEMX *EMX_Generate(int r, int c, void *arr);  // Generate a matrix\nvoid EMX_Free(EMX *mtx);  // Free a matrix which generated in EMX_Generate(...)\nvoid EMX_SetValue(EMX *mtx, int posr, int posc, emx_t val);  // Set a value at specific position\nemx_t EMX_GetValue(EMX *mtx, int posr, int posc);  // Give a value at specific position\nvoid EMX_Fill(EMX *mtx, void *arr);  // Fill into matrix from array\nvoid EMX_Print(EMX *mtx);  // Print a matrix (You can change TAB_SIZE macro for proper display) \n\nEMX *EMX_Add_Pair(EMX *mtx1, EMX *mtx2);  // Add two matrix and return pointer of new matrix\nEMX *EMX_Add(int n, ...);  // Add two or more number of matrix\nEMX *EMX_Sub_Pair(EMX *mtx1, EMX *mtx2);  // Subtract two matrix and return pointer of new matrix\nEMX *EMX_Sub(int n, ...);  // Subtract two or more number of matrix\nEMX *EMX_Mul_Pair(EMX *mtx1, EMX *mtx2);  // Multiple two matrix and return pointer of new matrix\nEMX *EMX_Mul(int n, ...);  // Multiple two or more number of matrix\nEMX *EMX_Transpose(EMX *mtx);  // Give transpose of a matrix\n```\n## Usage\nDefault data type for members of matrix is `int` type. If you want to use `double` type then use `#define EMX_USE_DOUBLE_DATA` before `#include \"emx.h\"`\n```c\n// #define EMX_USE_DOUBLE_DATA\n#include \"emx.h\"\n\nemx_t dataA[2][2] = {\n  { 2,  2 },\n  { 1,  3 }\n};\nemx_t dataB[2][2] = {\n  { 3,  1 },\n  { 4,  0 }\n};\nemx_t dataC[2][4] = {\n  { 1,  2,  1,  3 },\n  { 2,  3,  1,  7 }\n};\n\nEMX *matrixA = EMX_Generate(2, 2, dataA);\nEMX *matrixB = EMX_Generate(2, 2, dataB);\nEMX *matrixC = EMX_Generate(2, 4, dataC);\n\nEMX *sum = EMX_Add(3, matrixA, matrixB, matrixA);\nEMX_Print(sum);\nEMX_Free(sum);\n\nEMX *sub = EMX_Sub(2, matrixA, matrixB);\nEMX_Print(sub);\nEMX_Free(sub);\n\nEMX *mul = EMX_Mul(2, matrixA, matrixC);\nEMX_Print(mul);\nEMX_Free(mul);\n\nEMX_Free(matrixA);\nEMX_Free(matrixB);\nEMX_Free(matrixC);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femrekz%2Femx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femrekz%2Femx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femrekz%2Femx/lists"}