all_dimension_select.hpp
Go to the documentation of this file.
1 
12 #ifndef MLPACK_METHODS_DECISION_TREE_ALL_DIMENSION_SELECT_HPP
13 #define MLPACK_METHODS_DECISION_TREE_ALL_DIMENSION_SELECT_HPP
14 
15 namespace mlpack {
16 namespace tree {
17 
23 {
24  public:
28  AllDimensionSelect(const size_t dimensions) : i(0), dimensions(dimensions) { }
29 
33  size_t Begin()
34  {
35  i = 0;
36  return 0;
37  }
38 
42  size_t End() const { return dimensions; }
43 
47  size_t Next() { return ++i; }
48 
49  private:
51  size_t i;
53  const size_t dimensions;
54 };
55 
56 } // namespace tree
57 } // namespace mlpack
58 
59 #endif
.hpp
Definition: add_to_po.hpp:21
size_t End() const
Get the last dimension to select from.
size_t Begin()
Get the first dimension to select from.
AllDimensionSelect(const size_t dimensions)
Construct the AllDimensionSelect object for the given number of dimensions.
This dimension selection policy allows any dimension to be selected for splitting.
size_t Next()
Get the next dimension.