| 99 | matrix<double,4,1> brown_solution (); |
| 100 | |
| 101 | class brown_function_model |
| 102 | { |
| 103 | public: |
| 104 | |
| 105 | // Define the type used to represent column vectors |
| 106 | typedef matrix<double,4,1> column_vector; |
| 107 | // Define the type used to represent the hessian matrix |
| 108 | typedef matrix<double> general_matrix; |
| 109 | |
| 110 | double operator() ( |
| 111 | const column_vector& x |
| 112 | ) const |
| 113 | { |
| 114 | return brown(x); |
| 115 | } |
| 116 | |
| 117 | void get_derivative_and_hessian ( |
| 118 | const column_vector& x, |
| 119 | column_vector& d, |
| 120 | general_matrix& h |
| 121 | ) const |
| 122 | { |
| 123 | d = brown_derivative(x); |
| 124 | h = brown_hessian(x); |
| 125 | } |
| 126 | }; |
| 127 | |
| 128 | // ---------------------------------------------------------------------------------------- |
| 129 | // ---------------------------------------------------------------------------------------- |
no outgoing calls