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

Lattice and Traceback building #104

Open
wants to merge 9 commits into
base: stopwatch
Choose a base branch
from
Open

Lattice and Traceback building #104

wants to merge 9 commits into from

Conversation

SimBe195
Copy link
Collaborator

@SimBe195 SimBe195 commented Mar 4, 2025

This PR adds a class LatticeTrace which is a Tracebackitem together with predecessor and sibling references in order to store the network of trace nodes making up a search lattice. This class is equipped with functions performTraceback and buildWordLattice which trace backwards from the node itself to build up a Traceback vector or StandardWordLattice. This class is going to be used in future search algorithms (e.g. #101).

Note: The Trace class of the AdvancedTreeSearch module is very similar but has a few additional members specific to that module. Because of the self-referential nature of the class (through predecessor and sibling) it is not straightforward to have the AdvancedTreeSearch Trace inherit from LatticeTrace though without introducing a bunch of dynamic_cast calls. So the options are:

  • Keep Trace and LatticeTrace separate and accept that they are very similar
  • Add the missing members from Trace to LatticeTrace to join them into one single class even though the other members are generally unused
  • Make Trace inherit from LatticeTrace and use dynamic_cast wherever siblings or predecessors are accessed

@SimBe195 SimBe195 requested review from curufinwe and larissakl March 4, 2025 20:06
@SimBe195 SimBe195 changed the base branch from master to stopwatch March 4, 2025 20:18
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