mlpack 3.4.2
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
15namespace mlpack {
16namespace 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
This dimension selection policy allows any dimension to be selected for splitting.
size_t & Dimensions()
Modify the number of dimensions.
size_t End() const
Get the last dimension to select from.
size_t Next()
Get the next dimension.
size_t Dimensions() const
Get the number of dimensions.
AllDimensionSelect()
Construct the AllDimensionSelect object for the given number of dimensions.
size_t Begin()
Get the first dimension to select from.
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1