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

Method init

biteopt.h:1733–1764  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1731 */
1732
1733 void init( CBiteRnd& rnd, const double* const InitParams = NULL,
1734 const double InitRadius = 1.0 )
1735 {
1736 int i;
1737
1738 for( i = 0; i < OptCount; i++ )
1739 {
1740 Opts[ i ] -> init( rnd, InitParams, InitRadius );
1741 }
1742
1743 BestOpt = Opts[ 0 ];
1744 CurOpt = Opts[ 0 ];
1745 LastOpt = CurOpt;
1746 StallCount = 0;
1747
1748 if( OptCount == 1 )
1749 {
1750 PushOpt = CurOpt;
1751 }
1752 else
1753 {
1754 while( true )
1755 {
1756 PushOpt = Opts[ rnd.getInt( OptCount )];
1757
1758 if( PushOpt != CurOpt )
1759 {
1760 break;
1761 }
1762 }
1763 }
1764 }
1765
1766 /**
1767 * Function performs the parameter optimization iteration that involves 1

Callers

nothing calls this directly

Calls 2

getIntMethod · 0.80
initMethod · 0.45

Tested by

no test coverage detected