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

Expand alphabets #433

Merged
merged 2 commits into from
Aug 23, 2024
Merged

Expand alphabets #433

merged 2 commits into from
Aug 23, 2024

Conversation

Adda0
Copy link
Collaborator

@Adda0 Adda0 commented Aug 16, 2024

This PR implements additional methods for alphabets to allow their copying, erasing symbols and clearing the alphabets, as requested by #426:

  • clear() method to clear the alphabet (for alphabets where it makes sense),
  • erase() method to erase a specific symbol from the alphabet (for alphabets where it makes sense),
  • copy constructors and copy assignments which allow for copying of the whole alphabets.

To allow erasing, the PR also modifies the return type of erase() operations for OrdVector and alphabets to follow the implementation of erase operations in standard library containers, returning the number of erased elements.

Fixes #426.

This follows the standard library implementation of erase operations
 for containers.
@Adda0 Adda0 requested a review from jurajsic August 16, 2024 11:31
@Adda0 Adda0 merged commit 17ffaf6 into devel Aug 23, 2024
18 checks passed
@Adda0 Adda0 deleted the expand_alphabets branch August 23, 2024 19:24
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.

Copying alphabets, deleting symbols from alphabets.
2 participants