move evaluate and operator() next to each other
parent
77578512f8
commit
9844a555d4
|
|
@ -93,6 +93,9 @@ class GTSAM_EXPORT DiscreteFactor : public Factor {
|
||||||
|
|
||||||
size_t cardinality(Key j) const { return cardinalities_.at(j); }
|
size_t cardinality(Key j) const { return cardinalities_.at(j); }
|
||||||
|
|
||||||
|
/// Calculate probability for given values
|
||||||
|
virtual double evaluate(const Assignment<Key>& values) const = 0;
|
||||||
|
|
||||||
/// Find value for given assignment of values to variables
|
/// Find value for given assignment of values to variables
|
||||||
virtual double operator()(const Assignment<Key>& values) const = 0;
|
virtual double operator()(const Assignment<Key>& values) const = 0;
|
||||||
|
|
||||||
|
|
@ -131,9 +134,6 @@ class GTSAM_EXPORT DiscreteFactor : public Factor {
|
||||||
virtual DiscreteFactor::shared_ptr operator/(
|
virtual DiscreteFactor::shared_ptr operator/(
|
||||||
const DiscreteFactor::shared_ptr& f) const = 0;
|
const DiscreteFactor::shared_ptr& f) const = 0;
|
||||||
|
|
||||||
/// Calculate probability for given values
|
|
||||||
virtual double evaluate(const Assignment<Key>& values) const = 0;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the number of non-zero values contained in this factor.
|
* Get the number of non-zero values contained in this factor.
|
||||||
* It could be much smaller than `prod_{key}(cardinality(key))`.
|
* It could be much smaller than `prod_{key}(cardinality(key))`.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue