ifsmirnov / jngen

Library for generating tests for olympiad problems
MIT License
244 stars 32 forks source link

Directed acyclic graphs do not respect the allowMulti option #11

Open nwoeanhinnogaehr opened 7 months ago

nwoeanhinnogaehr commented 7 months ago

In the doRandom function, the allowMulti parameter is used to avoid creating duplicate edges when initially generating the graph, but if allowAntiparallel is set and the graph should be acyclic then makeAcyclic will later flip the antiparallel edges, making parallel edges. I think that the allowAntiparallel parameter should be ignored if the graph is acyclic.