So, I failed previously to commit my random replacement implementation, now I really have committed it.
I decided as an experiement to try implementing it based on static dispatch, but it didn't work as collapse returns a FullPermutation. I'm having a think about this -- I'm not sure how much we are going to want to mix different implementations of Permutation in the same function, so I'm now wondering if the best option is:
1) Make lazy vs eager a compile time option, so we can compare then for benchmarking but they don't "pollute" the code.
2) Make everything dispatch on the permutation type.
So, I failed previously to commit my random replacement implementation, now I really have committed it.
I decided as an experiement to try implementing it based on static dispatch, but it didn't work as collapse returns a FullPermutation. I'm having a think about this -- I'm not sure how much we are going to want to mix different implementations of Permutation in the same function, so I'm now wondering if the best option is:
1) Make lazy vs eager a compile time option, so we can compare then for benchmarking but they don't "pollute" the code.
2) Make everything dispatch on the permutation type.