Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DAG generator #45

Merged
merged 5 commits into from
Sep 6, 2018
Merged

Add DAG generator #45

merged 5 commits into from
Sep 6, 2018

Conversation

YanWQ-monad
Copy link
Contributor

添加了连通图的生成器(包括 DAG、无向图、有向有环图)

文档:

# 下列方法生成的图保证连通
# 支持 self_loop, repeated_edges, weight_limit, weight_gen 参数,但不支持 directed,DAG 的 self_loop 默认为 False
graph = Graph.DAG(n, m) # 生成一个 n 点,m 边的有向无环图
graph = Graph.DAG(n, m, loop=True) # 生成一个 n 点,m 边的有向有环图
graph = Graph.UDAG(n, m) # 生成一个 n 点,m 边的无向图

@YanWQ-monad
Copy link
Contributor Author

Python2 测试失败,我明天再调一下

Python2 不支持 non_local……

@YanWQ-monad YanWQ-monad closed this Sep 4, 2018
Python 2 does not support `nonlocal`,
use array instead
@YanWQ-monad YanWQ-monad reopened this Sep 5, 2018
@YanWQ-monad YanWQ-monad changed the title Add DAG generator Add DAG generator #13 Sep 5, 2018
@YanWQ-monad YanWQ-monad changed the title Add DAG generator #13 Add DAG generator Sep 5, 2018
@YanWQ-monad
Copy link
Contributor Author

YanWQ-monad commented Sep 5, 2018

Reference #13 #35

@lin-toto lin-toto merged commit 3c072e9 into luogu-dev:master Sep 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants