12 #ifndef MLPACK_METHODS_DBSCAN_RANDOM_POINT_SELECTION_HPP 13 #define MLPACK_METHODS_DBSCAN_RANDOM_POINT_SELECTION_HPP 32 template<
typename MatType>
37 size_t size = data.n_cols;
38 if (unvisited.size() != size)
39 unvisited.resize(size,
true);
42 const size_t max = std::count(unvisited.begin(), unvisited.end(),
true);
47 for (
size_t i = 0; i < unvisited.size(); ++i)
63 std::vector<bool> unvisited;
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.
size_t Select(const size_t, const MatType &data)
Select the next point to use, randomly.
int RandInt(const int hiExclusive)
Generates a uniform random integer.
This class can be used to randomly select the next point to use for DBSCAN.