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

Method sample

biteort.h:398–422  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

396 */
397
398 void sample( CBiteRnd& rnd, double* const op ) const
399 {
400 int i;
401
402 for( i = 0; i < ParamCount; i++ )
403 {
404 TmpParams[ i ] = rnd.getGaussian();
405
406 TmpParams[ i ] *= ( TmpParams[ i ] < 0.0 ?
407 DParamsN[ i ] : DParams[ i ]);
408 }
409
410 for( i = 0; i < ParamCount; i++ )
411 {
412 double s = 0.0;
413 int j;
414
415 for( j = 0; j < ParamCount; j++ )
416 {
417 s += BParams[ i ][ j ] * TmpParams[ j ];
418 }
419
420 op[ i ] = s + CentParams[ i ];
421 }
422 }
423
424protected:
425 double* CovParamsBuf; ///< CovParams buffer.

Callers

nothing calls this directly

Calls 1

getGaussianMethod · 0.80

Tested by

no test coverage detected