Use a `HashSet` to track target patterns.
I have a draft at https://github.com/cubing/twsearch/compare/lgarron/TargetPatternCache but it will take some design work because:
- I don't want
SemiGroupActionPuzzleto requirePattern: Hash(since it's not needed when searching for a single target). - I don't want an automatic fallback to a slower method when
Pattern: Hashis not implemented.
Note that Rust doesn't have negative traits, so we can implement where TPuzzle:Pattern: Hash but not where TPuzzle:Pattern: !Hash. We can hang this off of SearchOptimizations if we need, but it needs to interoperate with HashPruneTable and I'm worried that adding even more type constraints to the codebase to make this work would confuse everyone other than me.
Can't we just plug in a trait?
-tom
On Fri, Mar 14, 2025 at 6:40 PM Lucas Garron @.***> wrote:
I have a draft at https://github.com/cubing/twsearch/compare/lgarron/TargetPatternCache but it will take some design because:
- I don't want SemiGroupActionPuzzle to require Pattern: Hash (since it's not needed when searching for a single target).
- I don't want an automatic fallback to a slower method when Pattern: Hash is not implemented.
— Reply to this email directly, view it on GitHub https://github.com/cubing/twsearch/issues/127, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMOLSYODZ5WQPKKEDKZFQD2UOAHJAVCNFSM6AAAAABZB45IFCVHI2DSMVQWIX3LMV43ASLTON2WKOZSHEZDCNJZGQ2DEOI . You are receiving this because you are subscribed to this thread.Message ID: @.***> [image: lgarron]lgarron created an issue (cubing/twsearch#127) https://github.com/cubing/twsearch/issues/127
I have a draft at https://github.com/cubing/twsearch/compare/lgarron/TargetPatternCache but it will take some design because:
- I don't want SemiGroupActionPuzzle to require Pattern: Hash (since it's not needed when searching for a single target).
- I don't want an automatic fallback to a slower method when Pattern: Hash is not implemented.
— Reply to this email directly, view it on GitHub https://github.com/cubing/twsearch/issues/127, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMOLSYODZ5WQPKKEDKZFQD2UOAHJAVCNFSM6AAAAABZB45IFCVHI2DSMVQWIX3LMV43ASLTON2WKOZSHEZDCNJZGQ2DEOI . You are receiving this because you are subscribed to this thread.Message ID: @.***>
--
- https://cube20.org/ http://cube20.org/ - https://golly.sf.net/ http://golly.sf.net/ - https://alpha.twizzle.net/ / -
Can't we just plug in a trait?
Sure, but "just" is doing a lot of heavy lifting. 😛