Closed laurentbartholdi closed 11 months ago
Not a bug, but it would make sense to add a isone
method to detect triviality.
Thanks @laurentbartholdi . For the first item you mentioned, I should have order
return 1
.
For the second comment, are you proposing that isone(p::Permutation)
should return true
exactly when p
is an identity permutation? That would be easily done, but just want to be clear on your suggestion.
Yes, exactly! a permutation p
can be multiplied with another one, and isone(p)
precisely when p*q=q
, so it makes perfect sense to have the identity permutation satisfy isone
. Also isone(p)
if and only if isone(matrix(p))
.
Thanks again. Changes implemented and should be visible soon as version 0.4.18. Do you think it would make sense to also add a one
method? That is one(p)
would return the identity permutation of the same length
as p
? Not sure this is needed.
Having a tad of trouble registering ...
Having a tad of trouble registering ...
Problem solved. New version is registered.
A border case for order is not well handled: