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

Function calcDiscus

tests/testfn.h:2102–2114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2100 -5.0, 5.0, 0.0, &calcDifferentPowers, NULL };
2101
2102static double calcDiscus( const double* const x, const int N )
2103{
2104 static const double condition = 1.0e6;
2105 double s = condition * sqr(x[0]);
2106 int i;
2107
2108 for( i = 1; i < N; i++ )
2109 {
2110 s += sqr(x[i]);
2111 }
2112
2113 return( s );
2114}
2115
2116static const CTestFn TestFnDiscus = { "Discus", 0, -5.0, 5.0, 0.0,
2117 &calcDiscus, NULL };

Callers

nothing calls this directly

Calls 1

sqrFunction · 0.85

Tested by

no test coverage detected