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

Customize discrete elimination in Hybrid #1955

Merged
merged 19 commits into from
Jan 3, 2025

Conversation

varunagrawal
Copy link
Collaborator

@varunagrawal varunagrawal commented Dec 31, 2024

PR 2/3: Customize the elimination of the discrete factors into a conditional on all the discrete variables since they form a fully-connected clique.

@varunagrawal varunagrawal self-assigned this Dec 31, 2024
Base automatically changed from hybrid-with-tablefactor to hybrid-timing January 1, 2025 00:42
@varunagrawal varunagrawal requested a review from dellaert January 1, 2025 01:49
gtsam/discrete/DiscreteConditional.cpp Outdated Show resolved Hide resolved
@@ -252,6 +252,15 @@ DecisionTreeFactor TableFactor::operator*(const DecisionTreeFactor& f) const {
DecisionTreeFactor TableFactor::toDecisionTreeFactor() const {
DiscreteKeys dkeys = discreteKeys();

// If no keys, then return empty DecisionTreeFactor
Copy link
Member

Choose a reason for hiding this comment

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

Fix in separate PR, with unit test you already have

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added in #1960

gtsam/hybrid/HybridGaussianFactorGraph.cpp Outdated Show resolved Hide resolved
gtsam/hybrid/HybridGaussianFactorGraph.cpp Outdated Show resolved Hide resolved
gtsam/hybrid/HybridGaussianFactorGraph.cpp Outdated Show resolved Hide resolved
@varunagrawal varunagrawal requested a review from dellaert January 2, 2025 00:19
gtsam/hybrid/HybridGaussianFactorGraph.cpp Outdated Show resolved Hide resolved
gtsam/hybrid/HybridGaussianFactorGraph.cpp Outdated Show resolved Hide resolved
gtsam/hybrid/HybridGaussianFactorGraph.cpp Show resolved Hide resolved
@varunagrawal varunagrawal requested a review from dellaert January 3, 2025 16:38
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.

Nice !

* @param factors The factors to multiply as a DiscreteFactorGraph.
* @return TableFactor
*/
static TableFactor TableProduct(const DiscreteFactorGraph &factors) {
Copy link
Member

Choose a reason for hiding this comment

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

Can be in another PR, but maybe this should be a method of DiscreteFactorGraph

@varunagrawal varunagrawal merged commit 73f98d8 into hybrid-timing Jan 3, 2025
33 checks passed
@varunagrawal varunagrawal deleted the hybrid-custom-discrete branch January 3, 2025 18:41
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