luogu-dev / luogu-dev/cyaron

fix(Graph): DAG/connected 函数中计算边数上限的错误

Open
#176 1 comment 0 reactions 0 assignees View on GitHub
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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.