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

Function powell

dlib/test/optimization.cpp:134–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132// ----------------------------------------------------------------------------------------
133
134 double powell ( const matrix<double,4,1>& x)
135 {
136 ++total_count;
137 return pow(x(0) + 10*x(1),2) +
138 pow(std::sqrt(5.0)*(x(2) - x(3)),2) +
139 pow((x(1) - 2*x(2))*(x(1) - 2*x(2)),2) +
140 pow(std::sqrt(10.0)*(x(0) - x(3))*(x(0) - x(3)),2);
141 }
142
143// ----------------------------------------------------------------------------------------
144

Callers 1

test_powellFunction · 0.85

Calls 2

xFunction · 0.85
sqrtFunction · 0.50

Tested by

no test coverage detected