override sum and max in TableDistribution
parent
9960f2d8dc
commit
96a136b4e3
|
@ -91,6 +91,21 @@ bool TableDistribution::equals(const DiscreteFactor& other, double tol) const {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ****************************************************************************/
|
||||||
|
DiscreteFactor::shared_ptr TableDistribution::sum(size_t nrFrontals) const {
|
||||||
|
return table_.sum(nrFrontals);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ****************************************************************************/
|
||||||
|
DiscreteFactor::shared_ptr TableDistribution::sum(const Ordering& keys) const {
|
||||||
|
return table_.sum(keys);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ****************************************************************************/
|
||||||
|
DiscreteFactor::shared_ptr TableDistribution::max(size_t nrFrontals) const {
|
||||||
|
return table_.max(nrFrontals);
|
||||||
|
}
|
||||||
|
|
||||||
/* ****************************************************************************/
|
/* ****************************************************************************/
|
||||||
DiscreteFactor::shared_ptr TableDistribution::max(const Ordering& keys) const {
|
DiscreteFactor::shared_ptr TableDistribution::max(const Ordering& keys) const {
|
||||||
return table_.max(keys);
|
return table_.max(keys);
|
||||||
|
|
|
@ -111,14 +111,17 @@ class GTSAM_EXPORT TableDistribution : public DiscreteConditional {
|
||||||
return table_.evaluate(values);
|
return table_.evaluate(values);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/// Create new factor by summing all values with the same separator values
|
||||||
* @brief Create new factor by maximizing over all
|
DiscreteFactor::shared_ptr sum(size_t nrFrontals) const override;
|
||||||
* values with the same separator.
|
|
||||||
*
|
/// Create new factor by summing all values with the same separator values
|
||||||
* @param keys The keys to sum over.
|
DiscreteFactor::shared_ptr sum(const Ordering& keys) const override;
|
||||||
* @return DiscreteFactor::shared_ptr
|
|
||||||
*/
|
/// Create new factor by maximizing over all values with the same separator.
|
||||||
virtual DiscreteFactor::shared_ptr max(const Ordering& keys) const override;
|
DiscreteFactor::shared_ptr max(size_t nrFrontals) const override;
|
||||||
|
|
||||||
|
/// Create new factor by maximizing over all values with the same separator.
|
||||||
|
DiscreteFactor::shared_ptr max(const Ordering& keys) const override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Return assignment that maximizes value.
|
* @brief Return assignment that maximizes value.
|
||||||
|
|
Loading…
Reference in New Issue