luogu-dev / luogu-dev/cyaron

Graph.to_str() 的 shuffle 参数不适用于有根树

Open
#101 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.7k
Forks
182
PR merge metrics
No merged PRs in 30d

Description

有根树使用 Graph.to_str() 时,如果使用 shuffle=True 参数,会导致根结点被 shuffle 到其它位置,这一操作对于有根树显然是没有任何意义的。为了避开 cyaron 的 shuffle 操作而手写 shuffle 的繁琐程度已经超过了直接用 Cpp 手搓数据。我建议参数应当允许仅 shuffle 点或仅 shuffle 边(或者支持不 shuffle 根节点的功能)。

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Graph.to_str() implementation and its handling of shuffle=True for rooted trees. Reproduce the root-moving behavior, then define whether completion means separate point and edge shuffling or preserving the root while shuffling; add coverage for the chosen behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.