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

HybridFactorGraph base class and other niceties #1221

Merged
merged 93 commits into from
Aug 24, 2022

Conversation

varunagrawal
Copy link
Collaborator

@varunagrawal varunagrawal commented Jun 7, 2022

Made HybridFactorGraph a base class for HybridGaussianFactorGraph and for HybridNonlinearFactorGraph which will be added in a later PR. This way, the code is more DRY and mirrors the inheritance structure of the [Nonlinear|Gaussian]FactorGraph classes.

Refactored tests for HybridGaussianFactorGraph to make them much more descriptive and to actually test things.

Also added tests and improvements to HybridBayesNet.

@varunagrawal varunagrawal requested a review from ProfFan June 7, 2022 22:41
@ProfFan
Copy link
Collaborator

ProfFan commented Aug 22, 2022

CI is failing

@varunagrawal
Copy link
Collaborator Author

That's because of the Ubuntu 18.04 brownout. Should work now.

TestResult tr;
return TestRegistry::runAllTests(tr);
}
/* ************************************************************************* */
Copy link
Collaborator

Choose a reason for hiding this comment

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

newline

Copy link
Collaborator

@ProfFan ProfFan left a comment

Choose a reason for hiding this comment

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

Approving sans two comments

using Base::add;

/// Add a discrete conditional to the Bayes Net.
void add(const DiscreteKey &key, const std::string &table) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am not in favor of more helpers, do we have similar stuff in DiscreteBayesNet?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We'll need this since we need to wrap the DiscreteConditional into a HybridConditional.

TestResult tr;
return TestRegistry::runAllTests(tr);
}
/* ************************************************************************* */
Copy link
Collaborator

Choose a reason for hiding this comment

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

newline

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 from @xsj01's PR. @xsj01 seems like your formatter isn't set up properly yet.

@varunagrawal varunagrawal merged commit ff20a50 into develop Aug 24, 2022
@varunagrawal varunagrawal deleted the hybrid/hybrid-factor-graph branch August 24, 2022 15:36
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.

4 participants