remove `using std::dynamic_pointer_cast;`
parent
3ba54eb25d
commit
bb95cd40d6
|
|
@ -26,8 +26,6 @@ static std::mt19937_64 kRandomNumberGenerator(42);
|
||||||
|
|
||||||
namespace gtsam {
|
namespace gtsam {
|
||||||
|
|
||||||
using std::dynamic_pointer_cast;
|
|
||||||
|
|
||||||
/* ************************************************************************ */
|
/* ************************************************************************ */
|
||||||
// Throw a runtime exception for method specified in string s,
|
// Throw a runtime exception for method specified in string s,
|
||||||
// and conditional f:
|
// and conditional f:
|
||||||
|
|
@ -253,9 +251,9 @@ GaussianBayesNetValTree HybridBayesNet::assembleTree() const {
|
||||||
|
|
||||||
for (auto &f : factors_) {
|
for (auto &f : factors_) {
|
||||||
// TODO(dellaert): just use a virtual method defined in HybridFactor.
|
// TODO(dellaert): just use a virtual method defined in HybridFactor.
|
||||||
if (auto gm = dynamic_pointer_cast<GaussianMixture>(f)) {
|
if (auto gm = std::dynamic_pointer_cast<GaussianMixture>(f)) {
|
||||||
result = gm->add(result);
|
result = gm->add(result);
|
||||||
} else if (auto hc = dynamic_pointer_cast<HybridConditional>(f)) {
|
} else if (auto hc = std::dynamic_pointer_cast<HybridConditional>(f)) {
|
||||||
if (auto gm = hc->asMixture()) {
|
if (auto gm = hc->asMixture()) {
|
||||||
result = gm->add(result);
|
result = gm->add(result);
|
||||||
} else if (auto g = hc->asGaussian()) {
|
} else if (auto g = hc->asGaussian()) {
|
||||||
|
|
@ -265,7 +263,7 @@ GaussianBayesNetValTree HybridBayesNet::assembleTree() const {
|
||||||
// TODO(dellaert): in C++20, we can use std::visit.
|
// TODO(dellaert): in C++20, we can use std::visit.
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
} else if (dynamic_pointer_cast<DiscreteFactor>(f)) {
|
} else if (std::dynamic_pointer_cast<DiscreteFactor>(f)) {
|
||||||
// Don't do anything for discrete-only factors
|
// Don't do anything for discrete-only factors
|
||||||
// since we want to evaluate continuous values only.
|
// since we want to evaluate continuous values only.
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue