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

Visitor Templates for BGL Solver #80

Merged
merged 11 commits into from
Sep 7, 2021

Conversation

marip8
Copy link
Collaborator

@marip8 marip8 commented Sep 7, 2021

This PR adds a template parameter to the BGL solver classes for generically specifying the event visitors to use in the search. Since the event visitors themselves do not inherit from a single base class, they can only be specified and stored within the search class using an additional template parameter. This makes the instantiation of the BGL search classes more difficult, but prevents the need for creating separate class instances for every useful combination of event visitors that a search might need.

In order to make the BGL search classes a little more user-friendly, the BGLDijkstraSVSESolverD/F and BGLDijkstraSVDESolverD/F typedefs represent the configuration of the "most effective" solvers (currently using the early terminator event visitor). Additionally a few macros were created for explicitly instantiating template classes for a Cartesian product of template parameters (i.e. float types with event visitor types), so the instantiation of each solver with every combination of float type with event visitor does not have to be manually specified.

Addresses #79

@marip8
Copy link
Collaborator Author

marip8 commented Sep 7, 2021

@colin-lewis-19 please review

@colin-lewis-19
Copy link
Contributor

Looks good. The templating & macros are a bit dense, but I think the increase in usability is well worth it

@marip8 marip8 mentioned this pull request Sep 7, 2021
@marip8 marip8 force-pushed the update/bgl-solvers-with-visitors branch from d96fcf8 to e4482d1 Compare September 7, 2021 17:18
@marip8 marip8 merged commit d56038b into swri-robotics:master Sep 7, 2021
@marip8 marip8 deleted the update/bgl-solvers-with-visitors branch September 7, 2021 18:55
@marip8 marip8 mentioned this pull request Sep 7, 2021
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.

2 participants