fix error
parent
e0e833c2fc
commit
84627c0c57
|
@ -144,7 +144,6 @@ class GTSAM_EXPORT DiscreteFactor : public Factor {
|
|||
/// Create new factor by maximizing over all values with the same separator.
|
||||
virtual DiscreteFactor::shared_ptr max(const Ordering& keys) const = 0;
|
||||
|
||||
|
||||
/**
|
||||
* Get the number of non-zero values contained in this factor.
|
||||
* It could be much smaller than `prod_{key}(cardinality(key))`.
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <gtsam/discrete/DecisionTreeFactor.h>
|
||||
#include <gtsam/discrete/DiscreteFactor.h>
|
||||
#include <gtsam/discrete/DiscreteKey.h>
|
||||
#include <gtsam/discrete/Ring.h>
|
||||
|
@ -177,6 +178,8 @@ class GTSAM_EXPORT TableFactor : public DiscreteFactor {
|
|||
return apply(*tf, safe_div);
|
||||
} else if (auto dtf = std::dynamic_pointer_cast<DecisionTreeFactor>(f)) {
|
||||
return apply(TableFactor(f->discreteKeys(), *dtf), safe_div);
|
||||
} else {
|
||||
throw std::runtime_error("Unknown derived type for DiscreteFactor");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue