Skip to content

Commit

Permalink
convert everything to DecisionTreeFactor so we can use override opera…
Browse files Browse the repository at this point in the history
…tor* method
  • Loading branch information
varunagrawal committed Jan 5, 2025
1 parent 13bafb0 commit a7fc6e3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions gtsam_unstable/discrete/AllDiff.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ class GTSAM_UNSTABLE_EXPORT AllDiff : public Constraint {
/// Multiply factors, DiscreteFactor::shared_ptr edition
DiscreteFactor::shared_ptr multiply(
const DiscreteFactor::shared_ptr& df) const override {
return std::make_shared<DecisionTreeFactor>(
this->operator*(df->toDecisionTreeFactor()));
return std::make_shared<DecisionTreeFactor>(this->toDecisionTreeFactor() *
df->toDecisionTreeFactor());
}

/// Compute error for each assignment and return as a tree
Expand Down
4 changes: 2 additions & 2 deletions gtsam_unstable/discrete/BinaryAllDiff.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ class BinaryAllDiff : public Constraint {
/// Multiply factors, DiscreteFactor::shared_ptr edition
DiscreteFactor::shared_ptr multiply(
const DiscreteFactor::shared_ptr& df) const override {
return std::make_shared<DecisionTreeFactor>(
this->operator*(df->toDecisionTreeFactor()));
return std::make_shared<DecisionTreeFactor>(this->toDecisionTreeFactor() *
df->toDecisionTreeFactor());
}

/*
Expand Down
4 changes: 2 additions & 2 deletions gtsam_unstable/discrete/Domain.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ class GTSAM_UNSTABLE_EXPORT Domain : public Constraint {
/// Multiply factors, DiscreteFactor::shared_ptr edition
DiscreteFactor::shared_ptr multiply(
const DiscreteFactor::shared_ptr& df) const override {
return std::make_shared<DecisionTreeFactor>(
this->operator*(df->toDecisionTreeFactor()));
return std::make_shared<DecisionTreeFactor>(this->toDecisionTreeFactor() *
df->toDecisionTreeFactor());
}

/*
Expand Down
4 changes: 2 additions & 2 deletions gtsam_unstable/discrete/SingleValue.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ class GTSAM_UNSTABLE_EXPORT SingleValue : public Constraint {
/// Multiply factors, DiscreteFactor::shared_ptr edition
DiscreteFactor::shared_ptr multiply(
const DiscreteFactor::shared_ptr& df) const override {
return std::make_shared<DecisionTreeFactor>(
this->operator*(df->toDecisionTreeFactor()));
return std::make_shared<DecisionTreeFactor>(this->toDecisionTreeFactor() *
df->toDecisionTreeFactor());
}

/*
Expand Down

0 comments on commit a7fc6e3

Please sign in to comment.