gene.cpp

来自「多目标进化算法源代码」· C++ 代码 · 共 58 行

CPP
58
字号
/*******************************************************************************	Gene.cpp				last change: 01/04/1999				version: 0.0.0				design:	Eckart Zitzler			Paul E. Sevinc					implementation:	Paul E. Sevinc				(c) 1998-1999:	Computer Engineering and Networks Laboratory				Swiss Federal Institute of Technology Zurich				description:			See Gene.h*******************************************************************************/#include "Gene.h"#include "RandomNr.h"#include "TIKEAFExceptions.h"Gene::Gene(	RandomNr&	rn,		double		pm )	throw ( ProbabilityException )	: randomNr( rn ), pMutation( pm ){#ifndef NOTIKEAFEXCEPTIONS	if ( pm < 0 || pm > 1 )	{		throw ProbabilityException( "from Gene::Gene" );	}#endif}Gene::~Gene(){}voidGene::setPMutation( double pm )	throw ( ProbabilityException ){#ifndef NOTIKEAFEXCEPTIONS	if ( pm < 0 || pm > 1 )	{		throw ProbabilityException( "from Gene::setPMutation" );	}#endif	pMutation = pm;}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?