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

Function calcPermFunction01

tests/testfn.h:3250–3271  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3248 -0.1846669934967, &calcMishra03, NULL };
3249
3250static double calcPermFunction01( const double* const x, const int N )
3251{
3252 const double Beta = 1000.0;
3253 double s1 = 0.0;
3254 int k;
3255
3256 for( k = 1; k <= N; k++ )
3257 {
3258 double s2 = 0.0;
3259 int i;
3260
3261 for( i = 1; i <= N; i++ )
3262 {
3263 s2 += ( pow( (double) i, (double) k ) + Beta ) *
3264 ( pow( x[ i - 1 ] / i, (double) k ) - 1.0 );
3265 }
3266
3267 s1 += s2 * s2;
3268 }
3269
3270 return( s1 );
3271}
3272
3273static void calcPermFunction01_p( double* const minv, double* const maxv,
3274 const int N, double* const optv )

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected