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

Method getMinSolIndex

biteopt.h:551–560  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

549 */
550
551 int getMinSolIndex( const int gi, CBiteRnd& rnd, const int ps )
552 {
553 static const double pp[ 4 ] = { 0.05, 0.125, 0.25, 0.5 };
554 const double r = ps * rnd.getPow( ps *
555 pp[ select( MinSolPwrSel[ gi ], rnd )]);
556
557 static const double rm[ 4 ] = { 0.0, 0.125, 0.25, 0.5 };
558
559 return( (int) ( r * rm[ select( MinSolMulSel[ gi ], rnd )]));
560 }
561
562 /**
563 * The original "bitmask inversion with random move" solution generator.

Callers

nothing calls this directly

Calls 1

getPowMethod · 0.80

Tested by

no test coverage detected