| 86 | // ---------------------------------------------------------------------------------------- |
| 87 | |
| 88 | double complex_holder_table ( double x0, double x1) |
| 89 | { |
| 90 | // The regular HolderTable function |
| 91 | //return -std::abs(sin(x0)*cos(x1)*exp(std::abs(1-std::sqrt(x0*x0+x1*x1)/pi))); |
| 92 | |
| 93 | // My more complex version of it with discontinuities and more local minima. |
| 94 | double sign = 1; |
| 95 | for (double j = -4; j < 9; j += 0.5) |
| 96 | { |
| 97 | if (j < x0 && x0 < j+0.5) |
| 98 | x0 += sign*0.25; |
| 99 | sign *= -1; |
| 100 | } |
| 101 | // HolderTable function tilted towards 10,10 |
| 102 | return -std::abs(sin(x0)*cos(x1)*exp(std::abs(1-std::sqrt(x0*x0+x1*x1)/pi))) +(x0+x1)/10 + sin(x0*10)*cos(x1*10); |
| 103 | } |
| 104 | |
| 105 | // ---------------------------------------------------------------------------------------- |
| 106 |
no test coverage detected