{"id":26575598,"url":"https://github.com/xiaohan2012/pyedmond","last_synced_at":"2026-04-29T19:31:36.777Z","repository":{"id":62580113,"uuid":"104254514","full_name":"xiaohan2012/pyedmond","owner":"xiaohan2012","description":"Edmonds optimal branching in C++ wrapped by Python","archived":false,"fork":false,"pushed_at":"2017-12-18T21:00:47.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-05T04:52:13.898Z","etag":null,"topics":["cpp","directed-graph","graph-algorithm","minimum-spanning-arborescence","python"],"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/xiaohan2012.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}},"created_at":"2017-09-20T18:42:33.000Z","updated_at":"2017-11-08T14:42:14.000Z","dependencies_parsed_at":"2022-11-03T21:01:10.953Z","dependency_job_id":null,"html_url":"https://github.com/xiaohan2012/pyedmond","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xiaohan2012/pyedmond","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaohan2012%2Fpyedmond","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaohan2012%2Fpyedmond/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaohan2012%2Fpyedmond/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaohan2012%2Fpyedmond/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xiaohan2012","download_url":"https://codeload.github.com/xiaohan2012/pyedmond/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaohan2012%2Fpyedmond/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32440850,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T18:12:22.909Z","status":"ssl_error","status_checked_at":"2026-04-29T18:11:33.322Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","directed-graph","graph-algorithm","minimum-spanning-arborescence","python"],"created_at":"2025-03-23T02:19:36.584Z","updated_at":"2026-04-29T19:31:36.755Z","avatar_url":"https://github.com/xiaohan2012.png","language":"C++","readme":"# pyedmond\n\nEdmond's optimal branching algorithm in C++ wrapped by Python.\n\nAs it's in C++ internally, it's faster and more memory-efficient than [networkx.maximum_spanning_arborescence](https://networkx.github.io/documentation/networkx-1.10/reference/generated/networkx.algorithms.tree.branchings.maximum_spanning_arborescence.html)\n\n# Example usage\n\n```python\nimport numpy as np\nimport networkx as nx\nfrom pyedmond import find_minimum_branching\n\ng = nx.complete_graph(10, create_using=nx.DiGraph())\nweights = np.abs(np.random.rand(g.number_of_edges()))\nfor k, (i, j) in enumerate(g.edges_iter()):\n    g[i][j]['weight'] = weights[k]\n\nedges = find_minimum_branching(g, roots=[0, 1])  # returns a list of (int, int) edges\n```\n\n# Installation\n\n    pip3 install pyedmond\n\n# Test\n\n    python3 setup.py test\n\n# notes on code\n\n## `_core.cpp`\n\nthe interface between python and edmonds algorithm\n\n## Main classes/functions\n\n- `Graph`: the graph type\n- `build_graph`: build graph from a list of edges and weights\n- `optimal_branching`: find the optimal branching (used internally, need to convert the graph by yourself)\n- `find_optimal_branching`: higher level function (graph is converted automatically)\n\n\n# Todo\n\n- [X] setup.py\n- [X] usage documentation\n- [ ] test coverage\n- [ ] benchmark plot\n\n# Reference\n\nthe C++ part is based on [atofigh/edmonds-alg](https://github.com/atofigh/edmonds-alg)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiaohan2012%2Fpyedmond","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxiaohan2012%2Fpyedmond","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiaohan2012%2Fpyedmond/lists"}