MCPcopy Create free account
hub / github.com/alandefreitas/matplotplusplus / peaks

Function peaks

source/matplot/util/common.cpp:546–551  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

544 }
545
546 double peaks(double x, double y) {
547 return 3. * pow(1. - x, 2.) * exp(-pow(x, 2.) - pow(y + 1., 2.)) -
548 10. * (x / 5. - pow(x, 3.) - pow(y, 5.)) *
549 exp(-pow(x, 2.) - pow(y, 2.)) -
550 1. / 3. * exp(-pow(x + 1., 2.) - pow(y, 2.));
551 }
552
553 vector_2d peaks(const vector_2d &X, const vector_2d &Y) {
554 const size_t n_rows = std::min(X.size(), Y.size());

Callers 15

mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85

Calls 4

linspaceFunction · 0.85
meshgridFunction · 0.85
minFunction · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected