diff --git a/gtsam/hybrid/HybridFactorGraph.cpp b/gtsam/hybrid/HybridFactorGraph.cpp index 098942f10..2224c4a38 100644 --- a/gtsam/hybrid/HybridFactorGraph.cpp +++ b/gtsam/hybrid/HybridFactorGraph.cpp @@ -25,7 +25,7 @@ namespace gtsam { /* ************************************************************************* */ -std::set HybridFactorGraph::discreteKeys() const { +DiscreteKeys HybridFactorGraph::discreteKeys() const { std::set keys; for (auto& factor : factors_) { if (auto p = boost::dynamic_pointer_cast(factor)) { @@ -39,7 +39,7 @@ std::set HybridFactorGraph::discreteKeys() const { } } } - return keys; + return DiscreteKeys(keys.begin(), keys.end()); } /* ************************************************************************* */