mlpack 3.4.2
ordered_selection.hpp
Go to the documentation of this file.
1
14#ifndef MLPACK_METHODS_NYSTROEM_METHOD_ORDERED_SELECTION_HPP
15#define MLPACK_METHODS_NYSTROEM_METHOD_ORDERED_SELECTION_HPP
16
17#include <mlpack/prereqs.hpp>
18
19namespace mlpack {
20namespace kernel {
21
23{
24 public:
32 const static arma::Col<size_t> Select(const arma::mat& /* data */,
33 const size_t m)
34 {
35 // This generates [0 1 2 3 ... (m - 1)].
36 return arma::linspace<arma::Col<size_t> >(0, m - 1, m);
37 }
38};
39
40} // namespace kernel
41} // namespace mlpack
42
43#endif
static const arma::Col< size_t > Select(const arma::mat &, const size_t m)
Select the specified number of points in the dataset.
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1
The core includes that mlpack expects; standard C++ includes and Armadillo.