gaselectduplicatesparams.h
来自「遗传算法做的排课系统」· C头文件 代码 · 共 52 行
H
52 行
#ifndef __GA_SELECT_DUPLICATES_PARAMS_H__
#define __GA_SELECT_DUPLICATES_PARAMS_H__
#include "..\GaSelection.h"
using namespace Population;
namespace Population
{
namespace SelectionOperations
{
// Parameters for controling the duplicates in selection.
class GaSelectDuplicatesParams : public GaSelectionParams
{
private:
// If set to TRUE dupilcates in result set are allowed
bool _duplicates;
public:
// Initialization of the parameters
DLL_EXPORT
GaSelectDuplicatesParams(bool duplicates,
int selectionSize);
// Initialization of the parameters with default values
DLL_EXPORT
GaSelectDuplicatesParams();
// Virtual copy constructor
DLL_EXPORT
virtual GaParameters* GACALL Clone() const;
// Returns TRUE if dupilcates in result set are allowed
DLL_EXPORT
bool GACALL GetDuplicates() const;
// Set to TRUE if dupilcates in result set are allowed
DLL_EXPORT
void GACALL SetDuplicates(bool duplicates);
};// END CLASS DEFINITION GaSelectDuplicatesParams
} // SelectionOperations
} // Population
#endif // __GA_SELECT_DUPLICATES_PARAMS_H__
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?