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

Various Discrete Improvements #1927

Merged
merged 9 commits into from
Dec 10, 2024
Merged

Various Discrete Improvements #1927

merged 9 commits into from
Dec 10, 2024

Conversation

varunagrawal
Copy link
Collaborator

  1. Use the DiscreteFactorGraph::product method since it has a pointer check in it.
  2. Put common code in ProductAndNormalize.
  3. Return DiscreteFactor as the $\tau$ factor after elimination, instead of DecisionTreeFactor.
  4. Reduce some code duplication in DiscreteConditional aka less code is better code.
  5. Formatting.

// PRODUCT: multiply all factors
gttic(product);
DecisionTreeFactor product;
for (auto&& factor : factors) product = (*factor) * product;
DecisionTreeFactor product = factors.product();
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is the biggest fix in this PR since now we also check for nullptrs.

@varunagrawal varunagrawal merged commit 2c9e315 into develop Dec 10, 2024
33 checks passed
@varunagrawal varunagrawal deleted the discrete-improvements branch December 10, 2024 23:31
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