Skip to content

Improve bidict implementation and tests - #1670

Open
elliottslaughter wants to merge 1 commit into
flexflow:masterfrom
elliottslaughter:bidict
Open

Improve bidict implementation and tests#1670
elliottslaughter wants to merge 1 commit into
flexflow:masterfrom
elliottslaughter:bidict

Conversation

@elliottslaughter

@elliottslaughter elliottslaughter commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator
  • Implement bidict::equate, bidict::equate_strict, bidict::erase_l, and bidict::erase_r using only local checks
  • The semantics of bidict::equate (non-strict) are that conflicting keys are ERASED in order to preserve bidict consistency, so use it only when that's what you want
    • For the record, all existing users would be satisfied with bidict::equate_strict, but I'm trying to keep this PR small so I didn't update them
  • Run entire-bidict tests only at construction time
  • Update unit tests to test more of the interface (particularly constructors, mutation) and in the order that methods are declared in the original class

This change is Reviewable

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.

1 participant