{"id":31039606,"url":"https://github.com/joeesmithh/graphs","last_synced_at":"2026-04-19T05:35:01.533Z","repository":{"id":313426813,"uuid":"1051391547","full_name":"joeesmithh/graphs","owner":"joeesmithh","description":"A modular graph library written in C++ with adjacency list/matrix representation, traversal algorithms, and a driver—used to validate shortest-path and connectivity algorithms.","archived":false,"fork":false,"pushed_at":"2025-09-13T08:37:24.000Z","size":981,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-13T10:45:38.687Z","etag":null,"topics":["cpp","data-structures-and-algorithms","gui","qt"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joeesmithh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-05T23:00:08.000Z","updated_at":"2025-09-13T08:45:41.000Z","dependencies_parsed_at":"2025-09-06T01:17:08.912Z","dependency_job_id":"ba8770bb-e778-4720-a5fa-512e67fbec58","html_url":"https://github.com/joeesmithh/graphs","commit_stats":null,"previous_names":["joeesmithh/graphs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/joeesmithh/graphs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeesmithh%2Fgraphs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeesmithh%2Fgraphs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeesmithh%2Fgraphs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeesmithh%2Fgraphs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joeesmithh","download_url":"https://codeload.github.com/joeesmithh/graphs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeesmithh%2Fgraphs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275076591,"owners_count":25401318,"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-14T02:00:10.474Z","response_time":75,"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","data-structures-and-algorithms","gui","qt"],"created_at":"2025-09-14T08:01:01.995Z","updated_at":"2026-04-19T05:35:01.528Z","avatar_url":"https://github.com/joeesmithh.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Graph Visualizer\n\nA C++/Qt application for creating, visualizing, and interacting with graphs.  \nThis project implements graph data structures (adjacency list and adjacency matrix) with a unified interface, and provides a GUI for building and traversing graphs in real-time.\n\n\u003cbr\u003e\n\n## Features\n\n- **Graph Implementations**  \n  - `ListGraph`: Directed, weighted adjacency list representation.  \n  - `MatrixGraph`: Directed, weighted adjacency matrix representation.  \n  - `GraphInterface`: Abstract interface ensuring consistent operations across implementations.  \n\n- **GUI (Qt-based)**  \n  - Create and connect vertices interactively.  \n  - Real-time graph visualization using `QGraphicsView`.  \n  - Menu-driven controls for adding vertices and traversals.  \n\n- **Core Functionality**  \n  - Add vertices and edges dynamically.  \n  - Track number of vertices and edges.  \n  - Traversal support with reset mechanisms.  \n\n\n\u003cbr\u003e\n\n## Demo\n\u003ctable\u003e\n    \u003ctr\u003e\n        \u003cth\u003eVertex Creation\u003c/th\u003e\n        \u003cth\u003eDepth-First Traversal\u003c/th\u003e\n    \u003c/tr\u003e\n    \u003ctr align=\"center\"\u003e\n        \u003ctd\u003e\n            \u003cimg src=\"./images/graphs_add_vertices.gif\"\u003e\n        \u003c/td\u003e\n        \u003ctd \u003e\n            \u003cimg src=\"./images/graphs_traverse.gif\"\u003e\n        \u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003cbr\u003e\n\n## Project Structure\n- `GraphInterface.h` – Abstract class defining graph operations\n- `MatrixGraph.h / .cpp` – Adjacency matrix graph implementation\n- `ListGraph.h / .cpp` – Adjacency list graph implementation\n- `GraphVertex.h / .cpp` - Data container managed by ListGraph\n- `GUIGraph.h / .cpp` – Graph GUI integration using Qt\n- `GUIVertex.h / .cpp` – Vertex GUI integration using Qt\n- `main_window.*` – Main application window setup\n- `create_vertex_dialog.*` – Dialog for adding vertices\n\n\u003cbr\u003e\n\n## Future Improvements\n- Add breadth-first and depth-first traversal visualization.\n- Support for weighted edge editing via GUI.\n- Export/import graphs to file formats (JSON, CSV).\n\n\u003cbr\u003e\n\n## Getting Started\n\n### Prerequisites\n- **C++17 or later**\n- **Qt 5 or 6** development libraries\n- **Qt VS Tools** extension\n\n### Build Instructions\n```bash\n# Clone the repository\ngit clone https://github.com/joeesmithh/graphs.git\n```\n- Open `graphs.sln`\n- **Qt Project Settings**\n    - Specify **Qt Installation**\n    - Specify **Qt Modules**, `core;gui;widgets`\n\n\u003c!--- ## Implementation\n\u003ctable\u003e\n    \u003ctr\u003e\n        \u003cth\u003eObject\u003c/th\u003e\n        \u003cth\u003ePurpose\u003c/th\u003e\n        \u003cth\u003eKey Members\u003c/th\u003e\n        \u003cth\u003eKey Operations\u003c/th\u003e\n    \u003c/tr\u003e\n    \u003ctr valign=\"top\"\u003e\n        \u003ctd\u003e\n            \u003cstrong\u003eGraphVertex\u0026lt;T\u0026gt;\u003c/strong\u003e\n        \u003c/td\u003e\n        \u003ctd \u003e\n            Represents a graph vertex for an adjacency list implementation of the graph data structure.\n        \u003c/td\u003e\n        \u003ctd\u003e\n            \u003ccode\u003e\u003cstrong\u003edata\u003c/strong\u003e\u003c/code\u003e: the data contained within the vertex\u003cbr\u003e\n            \u003ccode\u003e\u003cstrong\u003eedges\u003c/strong\u003e\u003c/code\u003e: a list of other GraphVertex objects, represents directed edges\u003cbr\u003e\n        \u003c/td\u003e\n        \u003ctd \u003e\n            \u003ccode\u003e\u003cstrong\u003econnectTo\u003c/strong\u003e\u003c/code\u003e: forms a directed edge to GraphVertex parameter by adding it to the edges list.\u003cbr\u003e\n            \u003ccode\u003e\u003cstrong\u003edepthFirst\u003c/strong\u003e\u003c/code\u003e: performs a recursive traversal on all directed edges, calls lambda function parameter for each visited vertex\n        \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr valign=\"top\"\u003e\n        \u003ctd\u003e\n            \u003cstrong\u003eListGraph\u0026lt;T\u0026gt;\u003c/strong\u003e\n        \u003c/td\u003e\n        \u003ctd \u003e\n            Represents an adjacency list implementation of the graph data structure.\n        \u003c/td\u003e\n        \u003ctd \u003e\n            \u003ccode\u003e\u003cstrong\u003eroot\u003c/strong\u003e\u003c/code\u003e: pointer to the root vertex of the graph\u003cbr\u003e\n            \u003ccode\u003e\u003cstrong\u003etraversedStack\u003c/strong\u003e\u003c/code\u003e: dynamic stack containing traversed GraphVertex objects in reverse order of last traversal, used to clear vertex traversal flags\u003cbr\u003e\n            \u003ccode\u003e\u003cstrong\u003etraversedOrderStack\u003c/strong\u003e\u003c/code\u003e: dynamic stack containing traversed GraphVertex objects in order of the last traversal, used for visiting vertices in traversal order only when desired\n        \u003c/td\u003e\n        \u003ctd\u003e\n            \u003ccode\u003e\u003cstrong\u003eadd\u003c/strong\u003e\u003c/code\u003e: creates a directed edge in the graph between two \u003cstrong\u003eGraphVertex\u003c/strong\u003e objects with data matching arguments\u003cbr\u003e\n            \u003ccode\u003e\u003cstrong\u003edepthFirst\u003c/strong\u003e\u003c/code\u003e: Performs a depth-first traversal on the graph from the root vertex, calls lambda function parameter for each visited \u003cstrong\u003eGraphVertex\u003c/strong\u003e\u003cbr\u003e\n            \u003ccode\u003e\u003cstrong\u003edepthStep\u003c/strong\u003e\u003c/code\u003e: Step through a depth-first traversal by visiting the top-most item from the \u003cstrong\u003etraverseOrderStack\u003c/strong\u003e\n            \u003ccode\u003e\u003cstrong\u003euntraverse\u003c/strong\u003e\u003c/code\u003e: Pops traversed \u003cstrong\u003eGraphVertex\u003c/strong\u003e objects from \u003cstorng\u003etraversedStack\u003c/storng\u003e, calling lambda function parameter for each popped \u003cstrong\u003eGraphVertex\u003c/strong\u003e\n        \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr valign=\"top\"\u003e\n        \u003ctd\u003e\n            \u003cstrong\u003eGUIVertex\u003c/strong\u003e\n        \u003c/td\u003e\n        \u003ctd \u003e\n            [...]\n        \u003c/td\u003e\n        \u003ctd \u003e\n            [...]\n        \u003c/td\u003e\n        \u003ctd \u003e\n            [...]\n        \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr valign=\"top\"\u003e\n        \u003ctd\u003e\n            \u003cstrong\u003eGUIGraph\u003c/strong\u003e\n        \u003c/td\u003e\n        \u003ctd \u003e\n            [...]\n        \u003c/td\u003e\n        \u003ctd \u003e\n            [...]\n        \u003c/td\u003e\n        \u003ctd \u003e\n            [...]\n        \u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n--\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeesmithh%2Fgraphs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoeesmithh%2Fgraphs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeesmithh%2Fgraphs/lists"}