-
Notifications
You must be signed in to change notification settings - Fork 782
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
Conversation
gtsam/discrete/TableFactor.cpp
Outdated
@@ -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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added in #1960
There was a problem hiding this 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) { |
There was a problem hiding this comment.
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
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.