use DecisionTreeFactor version of sum and max where not available
parent
5e9c1300db
commit
b5128b2c9f
|
@ -84,19 +84,19 @@ class GTSAM_UNSTABLE_EXPORT AllDiff : public Constraint {
|
|||
uint64_t nrValues() const override { return 1; };
|
||||
|
||||
DiscreteFactor::shared_ptr sum(size_t nrFrontals) const override {
|
||||
throw std::runtime_error("Not implemented");
|
||||
return toDecisionTreeFactor().sum(nrFrontals);
|
||||
}
|
||||
|
||||
DiscreteFactor::shared_ptr sum(const Ordering& keys) const override {
|
||||
throw std::runtime_error("Not implemented");
|
||||
return toDecisionTreeFactor().sum(keys);
|
||||
}
|
||||
|
||||
DiscreteFactor::shared_ptr max(size_t nrFrontals) const override {
|
||||
throw std::runtime_error("Not implemented");
|
||||
return toDecisionTreeFactor().max(nrFrontals);
|
||||
}
|
||||
|
||||
DiscreteFactor::shared_ptr max(const Ordering& keys) const override {
|
||||
throw std::runtime_error("Not implemented");
|
||||
return toDecisionTreeFactor().max(keys);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -108,19 +108,19 @@ class BinaryAllDiff : public Constraint {
|
|||
uint64_t nrValues() const override { return 1; };
|
||||
|
||||
DiscreteFactor::shared_ptr sum(size_t nrFrontals) const override {
|
||||
throw std::runtime_error("Not implemented");
|
||||
return toDecisionTreeFactor().sum(nrFrontals);
|
||||
}
|
||||
|
||||
DiscreteFactor::shared_ptr sum(const Ordering& keys) const override {
|
||||
throw std::runtime_error("Not implemented");
|
||||
return toDecisionTreeFactor().sum(keys);
|
||||
}
|
||||
|
||||
DiscreteFactor::shared_ptr max(size_t nrFrontals) const override {
|
||||
throw std::runtime_error("Not implemented");
|
||||
return toDecisionTreeFactor().max(nrFrontals);
|
||||
}
|
||||
|
||||
DiscreteFactor::shared_ptr max(const Ordering& keys) const override {
|
||||
throw std::runtime_error("Not implemented");
|
||||
return toDecisionTreeFactor().max(keys);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -123,19 +123,19 @@ class GTSAM_UNSTABLE_EXPORT Domain : public Constraint {
|
|||
Constraint::shared_ptr partiallyApply(const Domains& domains) const override;
|
||||
|
||||
DiscreteFactor::shared_ptr sum(size_t nrFrontals) const override {
|
||||
throw std::runtime_error("Not implemented");
|
||||
return toDecisionTreeFactor().sum(nrFrontals);
|
||||
}
|
||||
|
||||
DiscreteFactor::shared_ptr sum(const Ordering& keys) const override {
|
||||
throw std::runtime_error("Not implemented");
|
||||
return toDecisionTreeFactor().sum(keys);
|
||||
}
|
||||
|
||||
DiscreteFactor::shared_ptr max(size_t nrFrontals) const override {
|
||||
throw std::runtime_error("Not implemented");
|
||||
return toDecisionTreeFactor().max(nrFrontals);
|
||||
}
|
||||
|
||||
DiscreteFactor::shared_ptr max(const Ordering& keys) const override {
|
||||
throw std::runtime_error("Not implemented");
|
||||
return toDecisionTreeFactor().max(keys);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -89,19 +89,19 @@ class GTSAM_UNSTABLE_EXPORT SingleValue : public Constraint {
|
|||
uint64_t nrValues() const override { return 1; };
|
||||
|
||||
DiscreteFactor::shared_ptr sum(size_t nrFrontals) const override {
|
||||
throw std::runtime_error("Not implemented");
|
||||
return toDecisionTreeFactor().sum(nrFrontals);
|
||||
}
|
||||
|
||||
DiscreteFactor::shared_ptr sum(const Ordering& keys) const override {
|
||||
throw std::runtime_error("Not implemented");
|
||||
return toDecisionTreeFactor().sum(keys);
|
||||
}
|
||||
|
||||
DiscreteFactor::shared_ptr max(size_t nrFrontals) const override {
|
||||
throw std::runtime_error("Not implemented");
|
||||
return toDecisionTreeFactor().max(nrFrontals);
|
||||
}
|
||||
|
||||
DiscreteFactor::shared_ptr max(const Ordering& keys) const override {
|
||||
throw std::runtime_error("Not implemented");
|
||||
return toDecisionTreeFactor().max(keys);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue