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

Class rosen_model

examples/optimization_ex.cpp:88–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86// ----------------------------------------------------------------------------------------
87
88class rosen_model
89{
90 /*!
91 This object is a "function model" which can be used with the
92 find_min_trust_region() routine.
93 !*/
94
95public:
96 typedef ::column_vector column_vector;
97 typedef matrix<double> general_matrix;
98
99 double operator() (
100 const column_vector& x
101 ) const { return rosen(x); }
102
103 void get_derivative_and_hessian (
104 const column_vector& x,
105 column_vector& der,
106 general_matrix& hess
107 ) const
108 {
109 der = rosen_derivative(x);
110 hess = rosen_hessian(x);
111 }
112};
113
114// ----------------------------------------------------------------------------------------
115

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected