Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement permutation decoding #35

Closed
wants to merge 1 commit into from
Closed

Conversation

tirr-c
Copy link
Collaborator

@tirr-c tirr-c commented Oct 20, 2024

No description provided.

}
}

fn get_context(x: u32) -> usize {
Copy link
Member

Choose a reason for hiding this comment

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

Would you mind moving this above the impl block?


permutation.extend(0..skip as usize);
for idx in lehmer {
permutation.push(temp.remove(idx as usize));
Copy link
Member

Choose a reason for hiding this comment

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

Isn't this quadratic?

return Err(Error::InvalidPermutationSize { size, skip, end });
}

let mut lehmer = Vec::new();
Copy link
Member

Choose a reason for hiding this comment

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

Might be worth moving the un-lehmering to another function

@mo271 mo271 mentioned this pull request Oct 25, 2024
@mo271
Copy link
Member

mo271 commented Oct 28, 2024

changes were integrated in #36

@mo271 mo271 closed this Oct 28, 2024
@tirr-c tirr-c deleted the permutation branch October 28, 2024 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants