| 1470 | */ |
| 1471 | |
| 1472 | void generateSol12( CBiteRnd& rnd ) |
| 1473 | { |
| 1474 | ptype* const Params = TmpParams; |
| 1475 | |
| 1476 | const ptype* const rp1 = getParamsOrdered( |
| 1477 | rnd.getSqrInt( CurPopSize )); |
| 1478 | |
| 1479 | const ptype* const rp2 = getParamsOrdered( |
| 1480 | rnd.getSqrIntInv( CurPopSize )); |
| 1481 | |
| 1482 | const ptype* const rpc = getCentroid(); |
| 1483 | double r = 0.0; |
| 1484 | int i; |
| 1485 | |
| 1486 | for( i = 0; i < ParamCount; i++ ) |
| 1487 | { |
| 1488 | const double d1 = (double) ( rp2[ i ] - rp1[ i ]); |
| 1489 | r += d1 * d1; |
| 1490 | } |
| 1491 | |
| 1492 | r = sqrt( r / ParamCount ); |
| 1493 | |
| 1494 | for( i = 0; i < ParamCount; i++ ) |
| 1495 | { |
| 1496 | Params[ i ] = rpc[ i ] + (ptype) ( rnd.getGaussian() * r ); |
| 1497 | } |
| 1498 | } |
| 1499 | |
| 1500 | /** |
| 1501 | * Solution generator that applies Differential Evolution in real |
nothing calls this directly
no test coverage detected