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

Function calcHyperGrid

tests/testfn.h:1829–1842  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1827 &calcHolzman, NULL };
1828
1829static double calcHyperGrid( const double* const x, const int N )
1830{
1831 const double a = 6.0;
1832 const double c = 5.0;
1833 double s = 0.0;
1834 int i;
1835
1836 for( i = 0; i < N; i++ )
1837 {
1838 s += pow(sin(c*M_PI*x[i]),a);
1839 }
1840
1841 return( -s/N );
1842}
1843
1844static const CTestFn TestFnHyperGrid = { "HyperGrid", 0, 0.0, 1.0, -1.0,
1845 &calcHyperGrid, NULL };

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected