{"id":39428143,"url":"https://github.com/elecbug/netkit","last_synced_at":"2026-05-18T05:14:35.200Z","repository":{"id":284714325,"uuid":"955824652","full_name":"elecbug/netkit","owner":"elecbug","description":"NetworkX-based graph and P2P libraries focused on performance","archived":false,"fork":false,"pushed_at":"2025-11-25T04:30:28.000Z","size":285,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-28T13:39:37.965Z","etag":null,"topics":["algorithms","graph","graph-algorithms","graph-theory","network"],"latest_commit_sha":null,"homepage":"","language":"Go","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/elecbug.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-27T08:59:37.000Z","updated_at":"2025-11-25T04:29:41.000Z","dependencies_parsed_at":"2025-03-27T10:22:10.828Z","dependency_job_id":"ed77a268-9a20-4434-a9b5-fb59c69f930c","html_url":"https://github.com/elecbug/netkit","commit_stats":null,"previous_names":["elecbug/go-type","elecbug/go-dspkg","elecbug/netkit"],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/elecbug/netkit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elecbug%2Fnetkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elecbug%2Fnetkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elecbug%2Fnetkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elecbug%2Fnetkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elecbug","download_url":"https://codeload.github.com/elecbug/netkit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elecbug%2Fnetkit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28529455,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"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":["algorithms","graph","graph-algorithms","graph-theory","network"],"created_at":"2026-01-18T04:00:44.815Z","updated_at":"2026-05-18T05:14:35.194Z","avatar_url":"https://github.com/elecbug.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Netkit\n\n**Netkit** is a Go graph algorithm library focused on clarity, extensibility, and practical performance.\n\nIt provides reusable graph data structures and common network analysis algorithms, with selected results validated against [NetworkX](https://networkx.org/).\n\n- Go 1.25+\n- Module: `github.com/elecbug/netkit`\n- License: MIT\n\n---\n\n## Features\n\nNetkit provides graph utilities and network analysis algorithms for both directed and undirected graphs.\n\nCurrent focus areas include:\n\n- Graph data structures\n- Shortest path analysis\n- Centrality metrics\n- Clustering metrics\n- Graph diameter\n- PageRank\n- Modularity analysis\n- NetworkX-compatible validation for selected algorithms\n\nImplemented or planned algorithms include:\n\n- Degree centrality\n- Betweenness centrality\n- Edge betweenness centrality\n- Closeness centrality\n- Eigenvector centrality\n- PageRank\n- Clustering coefficient\n- Degree assortativity coefficient\n- Diameter / weighted diameter\n- Modularity\n\n---\n\n## Installation\n\n```bash\ngo get github.com/elecbug/netkit@latest\n````\n\n---\n\n## Usage\n\n\u003e [!NOTE]\n\u003e Netkit is under active development. Public APIs may change before the first stable release.\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/elecbug/netkit/v2/analyzer\"\n\t\"github.com/elecbug/netkit/v2/graph\"\n)\n\nfunc main() {\n\tg := graph.NewGraph(false)\n\n\tg.AddNode(\"0\")\n\tg.AddNode(\"1\")\n\tg.AddNode(\"2\")\n\n\tg.AddEdge(\"0\", \"1\")\n\tg.AddEdge(\"1\", \"2\")\n\n\ta := analyzer.NewAnalyzer(g, nil)\n\n\tdegree, err := a.DegreeCentrality()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Println(degree)\n}\n```\n\n\u003e API details may vary by version. See package documentation and examples for the latest usage.\n\n---\n\n## Validation\n\nNetkit reimplements common graph and network algorithms in Go.\n\nWhere possible, algorithm outputs are validated against NetworkX to ensure correctness and compatibility of definitions.\n\nValidation currently covers metrics such as:\n\n* Degree centrality\n* Betweenness centrality\n* Edge betweenness centrality\n* Closeness centrality\n* Clustering coefficient\n* Degree assortativity coefficient\n* Diameter\n* Weighted diameter\n* Eigenvector centrality\n* PageRank\n* Shortest paths\n* Modularity\n\nSome algorithms, especially greedy community detection for modularity, may not produce byte-for-byte identical results to NetworkX because heuristic merge order, tie-breaking, and implementation details can differ.\n\n---\n\n## Development\n\nRun all tests:\n\n```bash\ngo test ./...\n```\n\nRun tests with verbose output:\n\n```bash\ngo test -v ./...\n```\n\nFormat code:\n\n```bash\ngofmt -w .\n```\n\n---\n\n## Project Goals\n\nNetkit is designed with the following goals:\n\n1. **Clarity**\n   Algorithms should be readable and easy to inspect.\n\n2. **Extensibility**\n   Graph structures and analysis components should be easy to extend.\n\n3. **Practical performance**\n   Implementations should be efficient enough for medium-to-large network analysis workloads.\n\n4. **Validation**\n   Results should be checked against established libraries such as NetworkX when possible.\n\n---\n\n## License\n\nMIT © 2025 elecbug. See [`LICENSE`](./LICENSE).\n\n---\n\n## Credits\n\nThis project reimplements common graph and network algorithms in Go with selected results validated against NetworkX.\n\nNetworkX is © the NetworkX Developers and distributed under the BSD 3-Clause License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felecbug%2Fnetkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felecbug%2Fnetkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felecbug%2Fnetkit/lists"}