Skip to content

Commit

Permalink
Two more methods are static
Browse files Browse the repository at this point in the history
  • Loading branch information
dellaert committed Oct 15, 2024
1 parent ba7674d commit 8cc5171
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions gtsam/discrete/DecisionTree-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ namespace gtsam {
template<typename L, typename Y>
template<typename It, typename ValueIt>
typename DecisionTree<L, Y>::NodePtr DecisionTree<L, Y>::build(
It begin, It end, ValueIt beginY, ValueIt endY) const {
It begin, It end, ValueIt beginY, ValueIt endY) {
// get crucial counts
size_t nrChoices = begin->second;
size_t size = endY - beginY;
Expand Down Expand Up @@ -692,7 +692,7 @@ namespace gtsam {
template<typename L, typename Y>
template<typename It, typename ValueIt>
typename DecisionTree<L, Y>::NodePtr DecisionTree<L, Y>::create(
It begin, It end, ValueIt beginY, ValueIt endY) const {
It begin, It end, ValueIt beginY, ValueIt endY) {
auto node = build(begin, end, beginY, endY);
if (auto choice = std::dynamic_pointer_cast<const Choice>(node)) {
return Choice::Unique(choice);
Expand Down
4 changes: 2 additions & 2 deletions gtsam/discrete/DecisionTree.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,15 +154,15 @@ namespace gtsam {
* and Y values
*/
template <typename It, typename ValueIt>
NodePtr build(It begin, It end, ValueIt beginY, ValueIt endY) const;
static NodePtr build(It begin, It end, ValueIt beginY, ValueIt endY);

/** 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;
static NodePtr create(It begin, It end, ValueIt beginY, ValueIt endY);

/**
* @brief Convert from a DecisionTree<L, X> to DecisionTree<L, Y>.
Expand Down

0 comments on commit 8cc5171

Please sign in to comment.