{"id":20528917,"url":"https://github.com/liavbarsheshet/initialized-array","last_synced_at":"2025-09-16T10:21:54.591Z","repository":{"id":60129134,"uuid":"541157538","full_name":"liavbarsheshet/initialized-array","owner":"liavbarsheshet","description":"Implementation of a generic Initialized Array.","archived":false,"fork":false,"pushed_at":"2022-09-25T12:07:21.000Z","size":2,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-22T00:39:01.692Z","etag":null,"topics":["array","cpp","init","initalized-array","initarray","initialize","initialized"],"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/liavbarsheshet.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}},"created_at":"2022-09-25T12:03:36.000Z","updated_at":"2023-04-26T15:12:22.000Z","dependencies_parsed_at":"2022-09-25T23:21:52.865Z","dependency_job_id":null,"html_url":"https://github.com/liavbarsheshet/initialized-array","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/liavbarsheshet/initialized-array","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liavbarsheshet%2Finitialized-array","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liavbarsheshet%2Finitialized-array/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liavbarsheshet%2Finitialized-array/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liavbarsheshet%2Finitialized-array/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liavbarsheshet","download_url":"https://codeload.github.com/liavbarsheshet/initialized-array/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liavbarsheshet%2Finitialized-array/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275400818,"owners_count":25458016,"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-09-16T02:00:10.229Z","response_time":65,"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":["array","cpp","init","initalized-array","initarray","initialize","initialized"],"created_at":"2024-11-15T23:27:58.953Z","updated_at":"2025-09-16T10:21:54.563Z","avatar_url":"https://github.com/liavbarsheshet.png","language":"C++","readme":"# C++ Initialized Array\n\nImplementation of a generic Initialized Array.\n\n---\n\n## Declaration\n\nSupports \u003e= c++11:\n\n```c++\n#include \"initialized-array.hpp\"\n\nauto initialized_array = InitArr::InitializedArray\u003cValue,Number\u003e();\n```\n\n## Template\n\n```c++\n/**\n * Class: Represents an initialized array.\n * @tparam Value - The type/class of the value.\n * @tparam Number - Class/Primitive number type for index representation.\n */\ntemplate\u003ctypename Value, typename Number\u003e\nclass InitArr::InitializedArray{...}\n```\n\n## Methods\n\nImplementation of a Generic Initialized Array.\n\n```cpp\n/**\n* Constructor: Creates an initialized array.\n* @note Worst-Time Complexity: O(1).\n* @note Worst-Space Complexity: O(3n).\n* @param length - The length of the array.\n* @param def - The default value which all values will be initialized to.\n*/\nInitializedArray(Number length, Value def);\n\n/**\n* Copy Constructor: Creates an initialized array from an existing one.\n* @note Worst-Time Complexity: O(top) \u003c= O(n).\n* @note Worst-Space Complexity: O(3n).\n* @param arr - The array reference.\n*/\nInitializedArray(const InitializedArray\u003cValue, Number\u003e \u0026arr);\n\n/**\n* Destructor: Deallocates the entire array.\n* @note Without responsibility of the content(items).\n* @note Worst-Time Complexity: O(1).\n*/\n~InitializedArray();\n\n/**\n* Gets the element at a specific index.\n* @note Worst-Time Complexity: O(1).\n* @param index - Specific index of an element.\n* @return {Value} Returns the element at specific index.\n*/\nValue Get(const Number \u0026index) const;\n\n/**\n* Sets the element at a specific index.\n* @note Worst-Time Complexity: O(1).\n* @param index - Specific index of an element.\n* @param value - Specific value.\n*/\nvoid Set(const Number \u0026index, Value value);\n\n/**\n* Gets the default value.\n* @note Worst-Time Complexity: O(1).\n* @return {Value} Returns the default value.\n*/\nValue Default() const;\n\n/**\n* Gets the length of the array.\n* @note Worst-Time Complexity: O(1).\n* @return {Number} Returns the length of the array.\n*/\nNumber Length() const;\n\n/**\n* Gets the element at a specific index.\n* @note Worst-Time Complexity: O(1).\n* @param index - Specific index of an element.\n* @return {Value} Returns the element at specific index.\n*/\nValue operator[](const Number \u0026index);\n```\n\n## Author\n\n[Liav Barsheshet, LBDevelopments](https://github.com/liavbarsheshet)\n\n## License\n\n[MIT](LICENSE)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliavbarsheshet%2Finitialized-array","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliavbarsheshet%2Finitialized-array","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliavbarsheshet%2Finitialized-array/lists"}