diff --git a/gtsam/discrete/DecisionTree-inl.h b/gtsam/discrete/DecisionTree-inl.h index 434a6beac..1f50014d6 100644 --- a/gtsam/discrete/DecisionTree-inl.h +++ b/gtsam/discrete/DecisionTree-inl.h @@ -1060,7 +1060,7 @@ namespace gtsam { template template std::pair, DecisionTree> DecisionTree::split( - std::function(const Y&)> AB_of_Y) { + std::function(const Y&)> AB_of_Y) const { using AB = std::pair; const DecisionTree ab(*this, AB_of_Y); const DecisionTree a(ab, [](const AB& p) { return p.first; }); diff --git a/gtsam/discrete/DecisionTree.h b/gtsam/discrete/DecisionTree.h index 6a966e0dd..aba5b88b7 100644 --- a/gtsam/discrete/DecisionTree.h +++ b/gtsam/discrete/DecisionTree.h @@ -416,7 +416,7 @@ namespace gtsam { */ template std::pair, DecisionTree> split( - std::function(const Y&)> AB_of_Y); + std::function(const Y&)> AB_of_Y) const; /// @name Advanced Interface /// @{ diff --git a/gtsam/hybrid/HybridGaussianFactorGraph.cpp b/gtsam/hybrid/HybridGaussianFactorGraph.cpp index 8e6123f10..361cb6e81 100644 --- a/gtsam/hybrid/HybridGaussianFactorGraph.cpp +++ b/gtsam/hybrid/HybridGaussianFactorGraph.cpp @@ -390,7 +390,7 @@ HybridGaussianFactorGraph::eliminate(const Ordering &keys) const { }; // Perform elimination! - ResultTree eliminationResults(prunedProductFactor, eliminate); + const ResultTree eliminationResults(prunedProductFactor, eliminate); // If there are no more continuous parents we create a DiscreteFactor with the // error for each discrete choice. Otherwise, create a HybridGaussianFactor