Skip to content

Commit ef2ffd4

Browse files
committed
cleaner assignment in augment()
1 parent f9031f5 commit ef2ffd4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

gtsam/hybrid/HybridGaussianFactor.cpp

+5-3
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,11 @@ HybridGaussianFactor::Factors augment(
4242
const HybridGaussianFactor::FactorValuePairs &factors) {
4343
// Find the minimum value so we can "proselytize" to positive values.
4444
// Done because we can't have sqrt of negative numbers.
45-
auto unzipped_pair = unzip(factors);
46-
const HybridGaussianFactor::Factors gaussianFactors = unzipped_pair.first;
47-
const AlgebraicDecisionTree<Key> valueTree = unzipped_pair.second;
45+
HybridGaussianFactor::Factors gaussianFactors;
46+
AlgebraicDecisionTree<Key> valueTree;
47+
std::tie(gaussianFactors, valueTree) = unzip(factors);
48+
49+
// Normalize
4850
double min_value = valueTree.min();
4951
AlgebraicDecisionTree<Key> values =
5052
valueTree.apply([&min_value](double n) { return n - min_value; });

0 commit comments

Comments
 (0)