Closed cscherrer closed 3 years ago
@cscherrer : Thanks for the suggestion. I'll look at this more closely when I have some time. I'm thinking that, perhaps, the Coxeter decomposition stuff should not be part of the module, but a separate file that a user can add if that function is desired. Thoughts?
This decomposition seems like a natural thing to be interested in for permutations. Can you help me understand the disadvantage of having it easily available?
BTW my interest in this is in the Kendall tau distance, which is the length of the terms
vector in the Coxeter representation. This has connections with Kendall's tau rank correlation, which is important in statistical applications.
OK. Thanks. New version pulled and registered as v0.4.1.
I ran into this problem:
The problem is that
_coxeter_reduce!
is recursive, and the recursion can be very deep for longer permutations. The algorithm mutates theterms
vector in-place, so there's really no need for recursion here. To change this without needing to restructure too much, I used a@label
and@goto
. This can be changed into something more elegant, but I'd think addressing the stack overflow problem should be a high priority.