better check for discrete factors
parent
6b3cb6579a
commit
a7b53aef0e
|
@ -584,9 +584,9 @@ GaussianFactorGraph HybridGaussianFactorGraph::choose(
|
||||||
DiscreteFactorGraph HybridGaussianFactorGraph::discreteFactors() const {
|
DiscreteFactorGraph HybridGaussianFactorGraph::discreteFactors() const {
|
||||||
DiscreteFactorGraph dfg;
|
DiscreteFactorGraph dfg;
|
||||||
for (auto &&f : factors_) {
|
for (auto &&f : factors_) {
|
||||||
auto discreteFactor = std::dynamic_pointer_cast<DiscreteFactor>(f);
|
if (auto discreteFactor = std::dynamic_pointer_cast<DiscreteFactor>(f)) {
|
||||||
assert(discreteFactor);
|
dfg.push_back(discreteFactor);
|
||||||
dfg.push_back(discreteFactor);
|
}
|
||||||
}
|
}
|
||||||
return dfg;
|
return dfg;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue