MCPcopy Create free account
hub / github.com/davisking/dlib / chebyquad_function_model

Class chebyquad_function_model

dlib/test/optimization_test_functions.h:51–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49 // ----------------------------------------------------------------------------------------
50
51 class chebyquad_function_model
52 {
53 public:
54
55 // Define the type used to represent column vectors
56 typedef matrix<double,0,1> column_vector;
57 // Define the type used to represent the hessian matrix
58 typedef matrix<double> general_matrix;
59
60 double operator() (
61 const column_vector& x
62 ) const
63 {
64 return chebyquad(x);
65 }
66
67 void get_derivative_and_hessian (
68 const column_vector& x,
69 column_vector& d,
70 general_matrix& h
71 ) const
72 {
73 d = chebyquad_derivative(x);
74 h = chebyquad_hessian(x);
75 }
76 };
77
78 // ----------------------------------------------------------------------------------------
79 // ----------------------------------------------------------------------------------------

Callers 1

test_problemsFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_problemsFunction · 0.68