peal / vole

A GAP package for backtrack search in permutation groups with graphs
https://peal.github.io/vole
Mozilla Public License 2.0
8 stars 2 forks source link

Make the Rust refiner `SetTupleTransporter` be happy with empty sets and tuples #44

Closed wilfwilson closed 2 years ago

wilfwilson commented 2 years ago

Hi @ChrisJefferson, this is my first time fiddling with Rust code, and in particular with the Rust parts of Vole, so I'd really appreciate you taking a look at this!

In particular, I'd like to know:

Resolves #40.

wilfwilson commented 2 years ago

My current "solution" is no such thing:

gap> VoleFind.Rep(4, VoleRefiner.SetTupleTransporter([[]], []));
fail
gap> VoleFind.Rep(4, VoleRefiner.SetTupleTransporter([], [[]]));
(1,4)(2,3)

So, depending on the order in which you give the left/right set-tuples, you get the right or wrong answer! Help!

ChrisJefferson commented 2 years ago

In regards your questions:

1) Yes, any colour for an extended vertex is fine (and extended vertices never mix with base vertices, or vertices extended from other refiner calls, new extended vertices are always created as a new cell)

2) Yes, it's fine to not do anything, of course if you do nothing in one branch, you have to do nothing in another branch (not calling refine_partition_cell_by is not the same as it not doing anything)

I'm surprised you are ever getting a permutation returned, as I would expect the check for answer would reject at the end, going to have a look.