{"id":16443398,"url":"https://github.com/0exp/meta_struct","last_synced_at":"2025-04-26T16:31:49.630Z","repository":{"id":54288699,"uuid":"302172943","full_name":"0exp/meta_struct","owner":"0exp","description":"MetaStruct - a collection of strongly business-oriented variants of commonly used data structures such as graphs, lists and etc.","archived":false,"fork":false,"pushed_at":"2021-02-26T08:49:32.000Z","size":104,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-18T20:54:23.092Z","etag":null,"topics":["metastruct","ruby-graph"],"latest_commit_sha":null,"homepage":"https://github.com/0exp/meta_struct","language":"Ruby","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/0exp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-07T22:15:33.000Z","updated_at":"2024-02-26T22:18:14.000Z","dependencies_parsed_at":"2022-08-13T11:01:06.300Z","dependency_job_id":null,"html_url":"https://github.com/0exp/meta_struct","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/0exp%2Fmeta_struct","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0exp%2Fmeta_struct/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0exp%2Fmeta_struct/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0exp%2Fmeta_struct/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0exp","download_url":"https://codeload.github.com/0exp/meta_struct/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251017553,"owners_count":21523608,"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":["metastruct","ruby-graph"],"created_at":"2024-10-11T09:20:20.526Z","updated_at":"2025-04-26T16:31:49.205Z","avatar_url":"https://github.com/0exp.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MetaStruct\n\nMetaStruct - a collection of strongly business-oriented variants of commonly used data structures such as graphs, lists and etc.\n\n---\n\n## Table of usage\n\n- [MetaStruct::Graph](#metastructgraph) (immutable directed acyclic graph)\n  - [Graph Invariants](#graph-invariants)\n  - [Graph Creation](#graph-creation)\n- [Contributing](#contributing)\n- [License](#license)\n- [Authors](#authors)\n\n---\n\n## MetaStruct::Graph\n\n`MetaStruct::Graph` - directed acyclic graph. Realized as a representational data structure (without mutation interfaces).\n\n- [Graph Invariants](#graph-invariants)\n- [Graph Creation](#graph-creation)\n\n---\n\n### Graph Invariants:\n\n- has only one root node;\n- has no non-connected nodes;\n- has no cycles (in development);\n- has exit (at least one);\n\n---\n\n### Graph Creation\n\n- create node `MetaStruct::Graph::Node`:\n\n```ruby\nMetaStruct::Graph::Node.create(\n  uuid: _your_uuid_, # autogenerated via SecureRandom.uuid by default\n  labels: _your_labels_, # [] by default\n  properties: _your_properties_ # {} by default\n)\n```\n\n- create edge `MetaStruct::Graph::Edge`:\n\n```ruby\nMetaStruct::Graph::Edge.create(\n  left_node: _your_left_node_, # an instance of MetaStruct::Graph::Node\n  right_node: _your_right_node_, # an instance of MetaStruct::Graph::Node\n  labels: _your_labels_, # [] by default\n  properties: _your_properties_, # {} by default\n  weight: _your_weight_ # 0 by default\n)\n```\n\n- build graph `MetaStruct::Graph`:\n  - fails on duplicated nodes (nodes with duplicated `uuid`s);\n  - fails on duplicated edges (duplicated edge objects wich have identical left and right nodes);\n  - fails on situation, when node has no edge entity (presented in edge list);\n  - fails on situation, when edge has node which is not presented in node list;\n\n```ruby\nMetaStruct::Graph.create(\n  nodes: _your_array_of_nodes_, # [] by default\n  edges: _your_array_of_edges # [] by default\n)\n```\n\n---\n\n## Contributing\n\n- Fork it ( https://github.com/0exp/meta_struct/fork )\n- Create your feature branch (`git checkout -b feature/my-new-feature`)\n- Commit your changes (`git commit -am '[my-new-featre] Add some feature'`)\n- Push to the branch (`git push origin feature/my-new-feature`)\n- Create new Pull Request\n\n## License\n\nReleased under MIT License.\n\n## Authors\n\n[Rustam Ibragimov](https://github.com/0exp)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0exp%2Fmeta_struct","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0exp%2Fmeta_struct","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0exp%2Fmeta_struct/lists"}