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() : i(0), dimensions(0) { }
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 
50  size_t Dimensions() const { return dimensions; }
52  size_t& Dimensions() { return dimensions; }
53 
54  private:
56  size_t i;
58  size_t dimensions;
59 };
60 
61 } // namespace tree
62 } // namespace mlpack
63 
64 #endif
size_t & Dimensions()
Modify the number of dimensions.
Linear algebra utility functions, generally performed on matrices or vectors.
size_t Dimensions() const
Get the number of dimensions.
size_t End() const
Get the last dimension to select from.
AllDimensionSelect()
Construct the AllDimensionSelect object for the given number of dimensions.
size_t Begin()
Get the first dimension to select from.
This dimension selection policy allows any dimension to be selected for splitting.
size_t Next()
Get the next dimension.