| 174 | // ---------------------------------------------------------------------------------------- |
| 175 | |
| 176 | double complex_holder_table ( double x0, double x1) |
| 177 | { |
| 178 | // The regular HolderTable function |
| 179 | //return -std::abs(sin(x0)*cos(x1)*exp(std::abs(1-std::sqrt(x0*x0+x1*x1)/pi))); |
| 180 | |
| 181 | // My more complex version of it with discontinuities and more local minima. |
| 182 | double sign = 1; |
| 183 | for (double j = -4; j < 9; j += 0.5) |
| 184 | { |
| 185 | if (j < x0 && x0 < j+0.5) |
| 186 | x0 += sign*0.25; |
| 187 | sign *= -1; |
| 188 | } |
| 189 | // HolderTable function tilted towards 10,10 |
| 190 | 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); |
| 191 | } |
| 192 | |
| 193 | // ---------------------------------------------------------------------------------------- |
| 194 |
no test coverage detected