return DiscreteKeys as a vector instead of a set

release/4.3a0
Varun Agrawal 2023-01-12 10:54:31 -05:00
parent 5c59862238
commit abe9b281af
1 changed files with 2 additions and 2 deletions

View File

@ -25,7 +25,7 @@
namespace gtsam { namespace gtsam {
/* ************************************************************************* */ /* ************************************************************************* */
std::set<DiscreteKey> HybridFactorGraph::discreteKeys() const { DiscreteKeys HybridFactorGraph::discreteKeys() const {
std::set<DiscreteKey> keys; std::set<DiscreteKey> keys;
for (auto& factor : factors_) { for (auto& factor : factors_) {
if (auto p = boost::dynamic_pointer_cast<DecisionTreeFactor>(factor)) { if (auto p = boost::dynamic_pointer_cast<DecisionTreeFactor>(factor)) {
@ -39,7 +39,7 @@ std::set<DiscreteKey> HybridFactorGraph::discreteKeys() const {
} }
} }
} }
return keys; return DiscreteKeys(keys.begin(), keys.end());
} }
/* ************************************************************************* */ /* ************************************************************************* */