remove excessive Unique call to improve efficiency
parent
68cb724970
commit
be70ffcf01
|
|
@ -627,7 +627,7 @@ namespace gtsam {
|
|||
NodePtr fi = compose(functions.begin(), functions.end(), label);
|
||||
choiceOnHighestLabel->push_back(fi);
|
||||
}
|
||||
return Choice::Unique(choiceOnHighestLabel);
|
||||
return choiceOnHighestLabel;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -691,8 +691,8 @@ namespace gtsam {
|
|||
}
|
||||
|
||||
/****************************************************************************/
|
||||
// Take a range of labels and a corresponding range of values,
|
||||
// and creates a decision tree.
|
||||
// Top-level factory method, which takes a range of labels and a corresponding
|
||||
// range of values, and creates a decision tree.
|
||||
template<typename L, typename Y>
|
||||
template<typename It, typename ValueIt>
|
||||
typename DecisionTree<L, Y>::NodePtr DecisionTree<L, Y>::create(
|
||||
|
|
|
|||
|
|
@ -142,8 +142,10 @@ namespace gtsam {
|
|||
template <typename It, typename ValueIt>
|
||||
NodePtr build(It begin, It end, ValueIt beginY, ValueIt endY) const;
|
||||
|
||||
/** Internal helper function to create from keys, cardinalities,
|
||||
* and Y values
|
||||
/** Internal helper function to create from
|
||||
* keys, cardinalities, and Y values.
|
||||
* Calls `build` which builds thetree bottom-up,
|
||||
* before we prune in a top-down fashion.
|
||||
*/
|
||||
template <typename It, typename ValueIt>
|
||||
NodePtr create(It begin, It end, ValueIt beginY, ValueIt endY) const;
|
||||
|
|
|
|||
Loading…
Reference in New Issue