Skip to content

HybridFactorGraph base class and other niceties - #1221

Merged
varunagrawal merged 93 commits into
developfrom
hybrid/hybrid-factor-graph
Aug 24, 2022
Merged

varunagrawal merged 93 commits into
developfrom
hybrid/hybrid-factor-graph

Conversation

@varunagrawal

@varunagrawal varunagrawal commented Jun 7, 2022 •

Copy link
Copy Markdown
Contributor

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

ProfFan commented Aug 22, 2022

Copy link
Copy Markdown
Collaborator

CI is failing

@varunagrawal

Copy link
Copy Markdown
Contributor Author

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

Comment thread gtsam/hybrid/tests/testHybridValues.cpp Outdated
TestResult tr;
return TestRegistry::runAllTests(tr);
}
/* ************************************************************************* */ No newline at end of file

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

newline

@ProfFan ProfFan left a comment

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
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
Copy Markdown
Contributor 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);
}
/* ************************************************************************* */ No newline at end of file

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

newline

Copy link
Copy Markdown
Contributor 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