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

Function rosen

dlib/test/optimization_test_functions.h:190–198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188
189 template <typename T>
190 T rosen ( const matrix<T,2,1>& m)
191 {
192 const T x = m(0);
193 const T y = m(1);
194
195 using std::pow;
196 // compute Rosenbrock's function and return the result
197 return 100.0*pow(y - x*x,2) + pow(1 - x,2);
198 }
199
200 template <typename T>
201 T rosen_residual (int i, const matrix<T,2,1>& m)

Callers 1

operator()Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected