luogu-dev / cyaron

CYaRon: Yet Another Random Olympic-iNformatics test data generator
GNU Lesser General Public License v3.0
1.31k stars 164 forks source link

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

Open Nanarikom opened 1 year ago

Nanarikom commented 1 year ago

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