Const correctness

release/4.3a0
Frank Dellaert 2024-10-17 02:06:10 +09:00
parent 6592f8a8b4
commit a19fb28fab
3 changed files with 3 additions and 3 deletions

View File

@ -1060,7 +1060,7 @@ namespace gtsam {
template <typename L, typename Y> template <typename L, typename Y>
template <typename A, typename B> template <typename A, typename B>
std::pair<DecisionTree<L, A>, DecisionTree<L, B>> DecisionTree<L, Y>::split( std::pair<DecisionTree<L, A>, DecisionTree<L, B>> DecisionTree<L, Y>::split(
std::function<std::pair<A, B>(const Y&)> AB_of_Y) { std::function<std::pair<A, B>(const Y&)> AB_of_Y) const {
using AB = std::pair<A, B>; using AB = std::pair<A, B>;
const DecisionTree<L, AB> ab(*this, AB_of_Y); const DecisionTree<L, AB> ab(*this, AB_of_Y);
const DecisionTree<L, A> a(ab, [](const AB& p) { return p.first; }); const DecisionTree<L, A> a(ab, [](const AB& p) { return p.first; });

View File

@ -416,7 +416,7 @@ namespace gtsam {
*/ */
template <typename A, typename B> template <typename A, typename B>
std::pair<DecisionTree<L, A>, DecisionTree<L, B>> split( std::pair<DecisionTree<L, A>, DecisionTree<L, B>> split(
std::function<std::pair<A, B>(const Y&)> AB_of_Y); std::function<std::pair<A, B>(const Y&)> AB_of_Y) const;
/// @name Advanced Interface /// @name Advanced Interface
/// @{ /// @{

View File

@ -390,7 +390,7 @@ HybridGaussianFactorGraph::eliminate(const Ordering &keys) const {
}; };
// Perform elimination! // Perform elimination!
ResultTree eliminationResults(prunedProductFactor, eliminate); const ResultTree eliminationResults(prunedProductFactor, eliminate);
// If there are no more continuous parents we create a DiscreteFactor with the // If there are no more continuous parents we create a DiscreteFactor with the
// error for each discrete choice. Otherwise, create a HybridGaussianFactor // error for each discrete choice. Otherwise, create a HybridGaussianFactor