{"id":23280942,"url":"https://github.com/claby2/graphw","last_synced_at":"2025-10-24T20:48:53.891Z","repository":{"id":112527085,"uuid":"280626786","full_name":"claby2/graphw","owner":"claby2","description":"C++ library for graph drawing and network analysis","archived":false,"fork":false,"pushed_at":"2021-01-04T12:35:17.000Z","size":257,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-06T13:39:55.103Z","etag":null,"topics":["cpp","graph","graph-generation","graph-theory","graph-visualization"],"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/claby2.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":"2020-07-18T09:46:16.000Z","updated_at":"2021-02-14T13:40:10.000Z","dependencies_parsed_at":"2023-03-14T07:00:49.288Z","dependency_job_id":null,"html_url":"https://github.com/claby2/graphw","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/claby2/graphw","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/claby2%2Fgraphw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/claby2%2Fgraphw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/claby2%2Fgraphw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/claby2%2Fgraphw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/claby2","download_url":"https://codeload.github.com/claby2/graphw/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/claby2%2Fgraphw/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280865097,"owners_count":26404443,"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-10-24T02:00:06.418Z","response_time":73,"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":["cpp","graph","graph-generation","graph-theory","graph-visualization"],"created_at":"2024-12-19T23:39:41.385Z","updated_at":"2025-10-24T20:48:53.841Z","avatar_url":"https://github.com/claby2.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# graphw\n\ngraphw is a C++ library for graph drawing and network analysis. The library implements various algorithms to construct, analyze, and model complex networks.\n\n## Getting Started\n\n### Dependencies\n\nInstall [SDL2](http://libsdl.org/download-2.0.php) to draw graphs.\n\n### Installation\n\n1.  Download the headers in [`graphw/`](https://github.com/claby2/graphw/tree/master/graphw).\n2.  Either put the header files in a central location (with a specified path) or directly in your project tree.\n\nDocumentation can be found in [`docs/`](./docs/readme.md).\n\n### Building\n\n```console\n$ mkdir build\n$ cd build\n$ cmake ..\n$ make\n```\n\n## Examples\n\n### Basic example\n\nA simple example that constructs and models a graph in a circular layout.\n\n```cpp\n#include \u003cgraphw/graphw.hpp\u003e\n#include \u003cgraphw/graphw_draw.hpp\u003e\n\nint main() {\n    graphw::CircularLayout g;\n    g.add_edge(\"a\", \"b\");\n    g.add_edge(\"b\", \"c\");\n    g.add_edge(\"c\", \"a\");\n    graphw::draw(g);\n}\n```\n\n### Spiral layout example\n\nExample of a balanced tree in a spiral layout.\n\n```cpp\n#include \u003cgraphw/graphw.hpp\u003e\n#include \u003cgraphw/graphw_draw.hpp\u003e\n\nint main() {\n    graphw::SpiralLayout g;\n    g.set_node_radius(0);\n    g.add_balanced_tree(2, 10);\n    graphw::draw(g);\n}\n```\n\n![spiral_layout_example](docs/images/spiral_layout_balanced_tree.png)\n\n### Additional examples\n\nMore examples can be found in [`examples/`](https://github.com/claby2/graphw/tree/master/examples).\n\n## Benchmarking\n\nBenchmarking does not require any external dependencies.\n\nCompile with:\n\n```console\n$ make benchmark\n```\n\n## Testing\n\nTesting requires [Catch2](https://github.com/catchorg/Catch2/).\n\nCompile with:\n\n```console\n$ make test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclaby2%2Fgraphw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclaby2%2Fgraphw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclaby2%2Fgraphw/lists"}