Skip to content

Conversation

@james-d-mitchell
Copy link
Member

Resolves #60. Previously a copy of the Perm16 in random was converted to an array, then shuffled, then the original Perm16 was returned. I.e. the original non-shuffled Perm16 was returned. This PR fixes this, so that the original Perm16 is not copied, but changed in place.

Copy link
Contributor

@Joseph-Edwards Joseph-Edwards left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thinks looks good to me, and the fix works on my machine too. I don't understand what's meant to happen if n>16 (undefined badness? perhaps we don't care) but that's not a concern for this PR.

@james-d-mitchell james-d-mitchell merged commit 27775c3 into libsemigroups:main Nov 20, 2025
17 checks passed
@james-d-mitchell james-d-mitchell deleted the fix-issue-60 branch November 20, 2025 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Perm16::random always returns the identity

2 participants