fix TableDistribution constructor call
parent
11a740e8e3
commit
b7bddde82b
|
|
@ -264,8 +264,7 @@ TableFactor TableProduct(const DiscreteFactorGraph &factors) {
|
||||||
TableFactor product;
|
TableFactor product;
|
||||||
for (auto &&factor : factors) {
|
for (auto &&factor : factors) {
|
||||||
if (factor) {
|
if (factor) {
|
||||||
if (auto dtc =
|
if (auto dtc = std::dynamic_pointer_cast<TableDistribution>(factor)) {
|
||||||
std::dynamic_pointer_cast<TableDistribution>(factor)) {
|
|
||||||
product = product * dtc->table();
|
product = product * dtc->table();
|
||||||
} else if (auto f = std::dynamic_pointer_cast<TableFactor>(factor)) {
|
} else if (auto f = std::dynamic_pointer_cast<TableFactor>(factor)) {
|
||||||
product = product * (*f);
|
product = product * (*f);
|
||||||
|
|
@ -363,8 +362,7 @@ discreteElimination(const HybridGaussianFactorGraph &factors,
|
||||||
#if GTSAM_HYBRID_TIMING
|
#if GTSAM_HYBRID_TIMING
|
||||||
gttic_(EliminateDiscreteFormDiscreteConditional);
|
gttic_(EliminateDiscreteFormDiscreteConditional);
|
||||||
#endif
|
#endif
|
||||||
auto conditional =
|
auto conditional = std::make_shared<TableDistribution>(product);
|
||||||
std::make_shared<TableDistribution>(frontalKeys.size(), product);
|
|
||||||
#if GTSAM_HYBRID_TIMING
|
#if GTSAM_HYBRID_TIMING
|
||||||
gttoc_(EliminateDiscreteFormDiscreteConditional);
|
gttoc_(EliminateDiscreteFormDiscreteConditional);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue