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

Make DiscreteFactor::operator() a common base method #1925

Merged
merged 5 commits into from
Dec 10, 2024

Conversation

varunagrawal
Copy link
Collaborator

@varunagrawal varunagrawal commented Dec 9, 2024

  1. Make operator() a common method amongst discrete factors which just calls evaluate(values). This reduces duplication.
  2. Update DiscreteValues to Assignment<Key> (the base class) since this is more generic. Otherwise operator()(DiscreteValues) doesn't work in all cases.

I am pulling out useful updates from #1919 and making smaller PRs. :)

@varunagrawal varunagrawal requested a review from dellaert December 9, 2024 21:57
@varunagrawal varunagrawal self-assigned this Dec 9, 2024
@varunagrawal varunagrawal changed the title Make DiscreteFactor::evaluate a common base method Make DiscreteFactor::operator() a common base method Dec 10, 2024
Copy link
Member

@dellaert dellaert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it! I’m a little bit worried about whether the type change will impact roboticsbook.org, but I think not. I’ll deal with it if so.

@varunagrawal
Copy link
Collaborator Author

I tried making it as general as possible so hopefully you have no impact. 🤞🏾

@varunagrawal varunagrawal merged commit 49cac97 into develop Dec 10, 2024
33 checks passed
@varunagrawal varunagrawal deleted the common-discrete-evaluate branch December 10, 2024 15: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.

2 participants