MLPACK  1.0.8
test_function.hpp
Go to the documentation of this file.
1 
22 #ifndef __MLPACK_CORE_OPTIMIZERS_SGD_TEST_FUNCTION_HPP
23 #define __MLPACK_CORE_OPTIMIZERS_SGD_TEST_FUNCTION_HPP
24 
25 #include <mlpack/core.hpp>
26 
27 namespace mlpack {
28 namespace optimization {
29 namespace test {
30 
36 {
37  public:
40 
42  size_t NumFunctions() const { return 3; }
43 
45  arma::mat GetInitialPoint() const { return arma::mat("6; -45.6; 6.2"); }
46 
48  double Evaluate(const arma::mat& coordinates, const size_t i) const;
49 
51  void Gradient(const arma::mat& coordinates,
52  const size_t i,
53  arma::mat& gradient) const;
54 };
55 
56 }; // namespace test
57 }; // namespace optimization
58 }; // namespace mlpack
59 
60 #endif