Conversation
Contributor
Author
|
解决了 #91 的问题。生成一棵树(或任意图),选一个点作为根节点即可。 |
d4744b3 to
2727298
Compare
Collaborator
Mr-Python-in-China
left a comment
There was a problem hiding this comment.
cyaron的io对象好像不太能直接打印这种对象
那既然返回的数据还要用户处理
我觉得就没必要把处理边权的部分放进这里了吧
Contributor
Author
我不想动,先挂在那行吗? |
Collaborator
这么摆 那我看着改改了 |
Contributor
Author
好,支持直接打印了 |
Collaborator
|
实现太奇葩了 我再想想怎么搞合适 |
Contributor
Author
|
我先将内容放其他分支了, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
加入生成树,返回格式为(父,子)元组的列表
默认是从
1开始执行 DFS(BFS 风格),可以通过指定容器实现 BFS 生成树或最小生成树。可以通过传入
from_weight决定是否显示边权和如何显示,默认是lambda w: None,即不显示。应该输出: