diff --git a/gtsam_unstable/discrete/AllDiff.h b/gtsam_unstable/discrete/AllDiff.h index 7a7b1cecc..34e5c4700 100644 --- a/gtsam_unstable/discrete/AllDiff.h +++ b/gtsam_unstable/discrete/AllDiff.h @@ -53,17 +53,6 @@ class GTSAM_UNSTABLE_EXPORT AllDiff : public Constraint { /// Multiply into a decisiontree DecisionTreeFactor operator*(const DecisionTreeFactor& f) const override; - /// Multiply factors, DiscreteFactor::shared_ptr edition - DiscreteFactor::shared_ptr multiply( - const DiscreteFactor::shared_ptr& df) const override { - return std::make_shared( - this->operator*(df->toDecisionTreeFactor())); - } - - /// divide by DiscreteFactor::shared_ptr f (safely) - DiscreteFactor::shared_ptr operator/( - const DiscreteFactor::shared_ptr& df) const override; - /// Compute error for each assignment and return as a tree AlgebraicDecisionTree errorTree() const override { throw std::runtime_error("AllDiff::error not implemented"); diff --git a/gtsam_unstable/discrete/BinaryAllDiff.h b/gtsam_unstable/discrete/BinaryAllDiff.h index fbff8a01c..0cd51ec61 100644 --- a/gtsam_unstable/discrete/BinaryAllDiff.h +++ b/gtsam_unstable/discrete/BinaryAllDiff.h @@ -69,19 +69,6 @@ class BinaryAllDiff : public Constraint { return toDecisionTreeFactor() * f; } - /// Multiply factors, DiscreteFactor::shared_ptr edition - DiscreteFactor::shared_ptr multiply( - const DiscreteFactor::shared_ptr& df) const override { - return std::make_shared( - this->operator*(df->toDecisionTreeFactor())); - } - - /// divide by DiscreteFactor::shared_ptr f (safely) - DiscreteFactor::shared_ptr operator/( - const DiscreteFactor::shared_ptr& df) const override { - return this->toDecisionTreeFactor() / df; - } - /* * Ensure Arc-consistency by checking every possible value of domain j. * @param j domain to be checked diff --git a/gtsam_unstable/discrete/Constraint.h b/gtsam_unstable/discrete/Constraint.h index 3526a282d..71ed7647a 100644 --- a/gtsam_unstable/discrete/Constraint.h +++ b/gtsam_unstable/discrete/Constraint.h @@ -78,6 +78,14 @@ class GTSAM_UNSTABLE_EXPORT Constraint : public DiscreteFactor { /// Partially apply known values, domain version virtual shared_ptr partiallyApply(const Domains&) const = 0; + + /// Multiply factors, DiscreteFactor::shared_ptr edition + DiscreteFactor::shared_ptr multiply( + const DiscreteFactor::shared_ptr& df) const override { + return std::make_shared( + this->operator*(df->toDecisionTreeFactor())); + } + /// @} /// @name Wrapper support /// @{ diff --git a/gtsam_unstable/discrete/Domain.h b/gtsam_unstable/discrete/Domain.h index 7362e9caf..2372cf499 100644 --- a/gtsam_unstable/discrete/Domain.h +++ b/gtsam_unstable/discrete/Domain.h @@ -90,17 +90,6 @@ class GTSAM_UNSTABLE_EXPORT Domain : public Constraint { /// Multiply into a decisiontree DecisionTreeFactor operator*(const DecisionTreeFactor& f) const override; - /// Multiply factors, DiscreteFactor::shared_ptr edition - DiscreteFactor::shared_ptr multiply( - const DiscreteFactor::shared_ptr& df) const override { - return std::make_shared( - this->operator*(df->toDecisionTreeFactor())); - } - - /// divide by DiscreteFactor::shared_ptr f (safely) - DiscreteFactor::shared_ptr operator/( - const DiscreteFactor::shared_ptr& df) const override; - /* * Ensure Arc-consistency by checking every possible value of domain j. * @param j domain to be checked diff --git a/gtsam_unstable/discrete/SingleValue.h b/gtsam_unstable/discrete/SingleValue.h index 87c42fc80..5d4c2dca1 100644 --- a/gtsam_unstable/discrete/SingleValue.h +++ b/gtsam_unstable/discrete/SingleValue.h @@ -63,17 +63,6 @@ class GTSAM_UNSTABLE_EXPORT SingleValue : public Constraint { /// Multiply into a decisiontree DecisionTreeFactor operator*(const DecisionTreeFactor& f) const override; - /// Multiply factors, DiscreteFactor::shared_ptr edition - DiscreteFactor::shared_ptr multiply( - const DiscreteFactor::shared_ptr& df) const override { - return std::make_shared( - this->operator*(df->toDecisionTreeFactor())); - } - - /// divide by DiscreteFactor::shared_ptr f (safely) - DiscreteFactor::shared_ptr operator/( - const DiscreteFactor::shared_ptr& df) const override; - /* * Ensure Arc-consistency: just sets domain[j] to {value_}. * @param j domain to be checked