add timing for hybrid pruning
parent
292e749756
commit
471efb1f1a
|
@ -49,6 +49,9 @@ bool HybridBayesNet::equals(const This &bn, double tol) const {
|
||||||
// search to find the K-best leaves and then create a single pruned conditional.
|
// search to find the K-best leaves and then create a single pruned conditional.
|
||||||
HybridBayesNet HybridBayesNet::prune(
|
HybridBayesNet HybridBayesNet::prune(
|
||||||
size_t maxNrLeaves, const std::optional<double> &deadModeThreshold) const {
|
size_t maxNrLeaves, const std::optional<double> &deadModeThreshold) const {
|
||||||
|
#if GTSAM_HYBRID_TIMING
|
||||||
|
gttic_(HybridPruning);
|
||||||
|
#endif
|
||||||
// Collect all the discrete conditionals. Could be small if already pruned.
|
// Collect all the discrete conditionals. Could be small if already pruned.
|
||||||
const DiscreteBayesNet marginal = discreteMarginal();
|
const DiscreteBayesNet marginal = discreteMarginal();
|
||||||
|
|
||||||
|
@ -152,6 +155,10 @@ HybridBayesNet HybridBayesNet::prune(
|
||||||
// We ignore DiscreteConditional as they are already pruned and added.
|
// We ignore DiscreteConditional as they are already pruned and added.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if GTSAM_HYBRID_TIMING
|
||||||
|
gttoc_(HybridPruning);
|
||||||
|
#endif
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue