bitgene.h

来自「多目标进化算法源代码」· C头文件 代码 · 共 59 行

H
59
字号
/*******************************************************************************	BitGene.h			last change: 02/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 also Gene.h			BitGene is a concrete subclass of Gene.						A BitGene instance codes one of two possible			alleles. They are stored as bools. Therefore			setAllele() expects a bool and getAllele() returns			a bool.*******************************************************************************/#ifndef BIT_GENE_H#define BIT_GENE_H#include "Gene.h"#include "RandomNr.h"#include "TIKEAFExceptions.h"class BitGene : public Gene{	private:			bool	allele;		public:			// initialize the mutation probability			// the allele is not (randomly) set!				BitGene( RandomNr&, double )					throw ( ProbabilityException );							void	initRandom();						// flip the allele			void	mutate();						// return a BitGene			Gene*	clone();						void	setAllele( bool );						bool	getAllele();};#endif

⌨️ 快捷键说明

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