rename allDiscreteKeys and allContinuousKeys to discreteKeys and continuousKeys respectively

release/4.3a0
Varun Agrawal 2022-09-20 05:16:26 -04:00
parent 2f8a0f82e0
commit c2ca426acc
3 changed files with 4 additions and 9 deletions

View File

@ -137,7 +137,7 @@ class HybridFactorGraph : public FactorGraph<HybridFactor> {
}
/// Get all the discrete keys in the factor graph.
const KeySet allDiscreteKeys() const {
const KeySet discreteKeys() const {
KeySet discrete_keys;
for (auto& factor : factors_) {
for (const DiscreteKey& k : factor->discreteKeys()) {
@ -148,7 +148,7 @@ class HybridFactorGraph : public FactorGraph<HybridFactor> {
}
/// Get all the continuous keys in the factor graph.
const KeySet allContinuousKeys() const {
const KeySet continuousKeys() const {
KeySet keys;
for (auto& factor : factors_) {
for (const Key& key : factor->continuousKeys()) {

View File

@ -406,7 +406,7 @@ void HybridGaussianFactorGraph::add(DecisionTreeFactor::shared_ptr factor) {
/* ************************************************************************ */
const Ordering HybridGaussianFactorGraph::getHybridOrdering() const {
KeySet discrete_keys = allDiscreteKeys();
KeySet discrete_keys = discreteKeys();
for (auto &factor : factors_) {
for (const DiscreteKey &k : factor->discreteKeys()) {
discrete_keys.insert(k.first);

View File

@ -63,12 +63,7 @@ void HybridGaussianISAM::updateInternal(
factors += boost::make_shared<BayesTreeOrphanWrapper<Node> >(orphan);
// Get all the discrete keys from the factors
KeySet allDiscrete;
for (auto& factor : factors) {
for (auto& k : factor->discreteKeys()) {
allDiscrete.insert(k.first);
}
}
KeySet allDiscrete = factors.discreteKeys();
// Create KeyVector with continuous keys followed by discrete keys.
KeyVector newKeysDiscreteLast;