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

Method init

spheropt.h:95–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93 */
94
95 void init( CBiteRnd& rnd, const double* const InitParams = NULL,
96 const double InitRadius = 1.0 )
97 {
98 initCommonVars( rnd );
99
100 Radius = 0.5 * InitRadius;
101 EvalFac = 2.0;
102 cure = 0;
103 curem = (int) ceil( CurPopSize * EvalFac );
104
105 // Provide initial centroid and sigma.
106
107 int i;
108
109 if( InitParams == NULL )
110 {
111 for( i = 0; i < ParamCount; i++ )
112 {
113 CentParams[ i ] = 0.5;
114 }
115
116 DoInitEvals = false;
117 }
118 else
119 {
120 for( i = 0; i < ParamCount; i++ )
121 {
122 CentParams[ i ] = wrapParam( rnd,
123 ( InitParams[ i ] - MinValues[ i ]) / DiffValues[ i ]);
124 }
125 }
126 }
127
128 /**
129 * Function performs the parameter optimization iteration that involves 1

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected