{"id":21928684,"url":"https://github.com/muellan/containers","last_synced_at":"2025-06-15T09:09:04.163Z","repository":{"id":73309161,"uuid":"14233257","full_name":"muellan/containers","owner":"muellan","description":"generic C++ containers; matrix, triangle matrix, crs sparse matrix, etc. ","archived":false,"fork":false,"pushed_at":"2018-03-23T14:01:18.000Z","size":231,"stargazers_count":12,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-19T19:50:55.319Z","etag":null,"topics":["c-plus-plus","collections","cpp","cpp11","crs","generic-containers","header-only","matrix","matrix-library","sparse-matrix"],"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/muellan.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":"2013-11-08T13:06:20.000Z","updated_at":"2024-05-03T17:28:19.000Z","dependencies_parsed_at":"2023-04-13T01:25:21.089Z","dependency_job_id":null,"html_url":"https://github.com/muellan/containers","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/muellan/containers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muellan%2Fcontainers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muellan%2Fcontainers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muellan%2Fcontainers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muellan%2Fcontainers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/muellan","download_url":"https://codeload.github.com/muellan/containers/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muellan%2Fcontainers/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259949680,"owners_count":22936411,"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":["c-plus-plus","collections","cpp","cpp11","crs","generic-containers","header-only","matrix","matrix-library","sparse-matrix"],"created_at":"2024-11-28T22:27:36.993Z","updated_at":"2025-06-15T09:09:04.139Z","avatar_url":"https://github.com/muellan.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"AM containers\n==========\n\nCollection of generic containers for C++14. \n\n- [Interfaces](#interfaces)\n- [Requirements](#requirements)\n\n\n\n## Quick Overview\n\n#### [matrix\\_array](#matrix-array)\n  2-dimensional statically sized array\n\n#### [dynamic\\_matrix](#dynamic-matrix)\n  2-dimensional dynamically sized array\n\n#### [triangle\\_matrix](#triangle-matrix)\n  lower triangle matrix that stores n\\*(n-1) elements\n  Note that indexing excludes the diagonal: \n  N rows =\u003e row indices: 1 ... n, column indices: 0 ... n-1\n\n#### [crs\\_matrix](#crs-sparse-matrix)\n  compressed row storage (crs) sparse matrix\n\n#### [compressed\\_multiset](#compressed-multiset)\n  multiset-like class that stores only one representative (of an equivalence class) per key instead of multiple equivalent values per key\n\n\n\n## Interfaces\n\nNote that the descriptions provided here are informal and simplified for better readability.\n\n\n\n### common\n\nAll containers have the following member functions:\n```cpp\n      any_container::iterator  any_container::begin();\nany_container::const_iterator  any_container::begin();\nany_container::const_iterator any_container::cbegin();\n\n      any_container::iterator  any_container::end();\nany_container::const_iterator  any_container::end();\nany_container::const_iterator any_container::cend();\n\nany_container::size_type any_container::size();\nbool any_container::empty();\n\n```\n\nThe following free standing function templates are defined for all containers:\n```cpp\n      iterator  begin(Container\u0026);\nconst_iterator  begin(const Container\u0026);\nconst_iterator cbegin(const Container\u0026);\n\n      iterator  end(Container\u0026);\nconst_iterator  end(const Container\u0026);\nconst_iterator cend(const Container\u0026);\n\nsize_type size(const Container\u0026);\nbool empty(const Container\u0026);\n```\n\n\n\n### triangle matrix\nA lower triangle matrix that stores n\\*(n-1) elements. The size can be changed at runtime and the container is allocator-aware.\n\nNote that indexing excludes the diagonal: N rows =\u003e row indices: 1 ... n, column indices: 0 ... n-1.\n\nOne special mechanism provided is the iteration over all elements that share the same index either as row or as column index. Suppose you have the triangle matrix\n```\n    |      column\nrow |  0    1    2    3\n----+------------------\n 1  | 10\n 2  | 20   21\n 3  | 30   31   32\n 4  | 40   41   42   43\n```\nthen all elements that 'share index 2' are: 20, 21, 32, 42\nThis is especially useful if the matrix cells represent values of a pairwise symmetric relation, like e.g. forces between physical objects. \n\n\n\n\n## Requirements\n  - requires C++14 conforming compiler\n  - tested with g++ 6.1.0, 7.2 and clang++ 5.0.1\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuellan%2Fcontainers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmuellan%2Fcontainers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuellan%2Fcontainers/lists"}