MCPcopy Create free account
hub / github.com/avaneev/biteopt / calcMultiModal

Function calcMultiModal

tests/testfn.h:2448–2461  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2446 -0.003791237220468656, &calcZettl, NULL };
2447
2448static double calcMultiModal( const double* const x, const int N )
2449{
2450 double s1 = 0.0;
2451 double s2 = 1.0;
2452 int i;
2453
2454 for( i = 0; i < N; i++ )
2455 {
2456 s1 += fabs(x[i]);
2457 s2 *= fabs(x[i]);
2458 }
2459
2460 return( s1*s2 );
2461}
2462
2463static const CTestFn TestFnMultiModal = { "MultiModal", 0, -10.0, 10.0, 0.0,
2464 &calcMultiModal, NULL };

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected