move operator/ to Constraint.h
parent
ab2fe3707c
commit
7561da4df2
|
@ -56,12 +56,6 @@ DecisionTreeFactor AllDiff::operator*(const DecisionTreeFactor& f) const {
|
|||
return toDecisionTreeFactor() * f;
|
||||
}
|
||||
|
||||
/* ************************************************************************* */
|
||||
DiscreteFactor::shared_ptr AllDiff::operator/(
|
||||
const DiscreteFactor::shared_ptr& df) const {
|
||||
return this->toDecisionTreeFactor() / df;
|
||||
}
|
||||
|
||||
/* ************************************************************************* */
|
||||
bool AllDiff::ensureArcConsistency(Key j, Domains* domains) const {
|
||||
Domain& Dj = domains->at(j);
|
||||
|
|
|
@ -86,6 +86,12 @@ class GTSAM_UNSTABLE_EXPORT Constraint : public DiscreteFactor {
|
|||
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;
|
||||
}
|
||||
|
||||
/// @}
|
||||
/// @name Wrapper support
|
||||
/// @{
|
||||
|
|
|
@ -49,12 +49,6 @@ DecisionTreeFactor Domain::operator*(const DecisionTreeFactor& f) const {
|
|||
return toDecisionTreeFactor() * f;
|
||||
}
|
||||
|
||||
/* ************************************************************************* */
|
||||
DiscreteFactor::shared_ptr Domain::operator/(
|
||||
const DiscreteFactor::shared_ptr& df) const {
|
||||
return this->toDecisionTreeFactor() / df;
|
||||
}
|
||||
|
||||
/* ************************************************************************* */
|
||||
bool Domain::ensureArcConsistency(Key j, Domains* domains) const {
|
||||
if (j != key()) throw invalid_argument("Domain check on wrong domain");
|
||||
|
|
|
@ -41,12 +41,6 @@ DecisionTreeFactor SingleValue::operator*(const DecisionTreeFactor& f) const {
|
|||
return toDecisionTreeFactor() * f;
|
||||
}
|
||||
|
||||
/* ************************************************************************* */
|
||||
DiscreteFactor::shared_ptr SingleValue::operator/(
|
||||
const DiscreteFactor::shared_ptr& df) const {
|
||||
return this->toDecisionTreeFactor() / df;
|
||||
}
|
||||
|
||||
/* ************************************************************************* */
|
||||
bool SingleValue::ensureArcConsistency(Key j, Domains* domains) const {
|
||||
if (j != keys_[0])
|
||||
|
|
Loading…
Reference in New Issue