fix(Graph): DAG/connected 函数中计算边数上限的错误
Open
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 182
- PR merge metrics
- No merged PRs in 30d
Description
语句`cyaron.Graph.DAG(10, 90, repeated_edges=False)` 将导致无限循环。
https://github.com/luogu-dev/cyaron/blob/0865426a68124828988f60c8b0e5d5db5cad8cde/cyaron/graph.py#L609-L615
应把 610 行的 `not loop` 换成 `loop`。
Contributor guide
No contributing guide indexed for this repository
Research direction
Open cyaron/graph.py around lines 609-615 and reproduce the issue with cyaron.Graph.DAG(10, 90, repeated_edges=False). Inspect the edge-limit calculation and confirm that the call completes instead of looping indefinitely; done means the corrected DAG/connected behavior no longer hangs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100