rsesgeneticreducer.h

来自「粗糙集应用软件」· C头文件 代码 · 共 70 行

H
70
字号
//-------------------------------------------------------------------
// Author........: Aleksander 豩rn
// Date..........: 960307
// Description...:
// Revisions.....:
//===================================================================

#ifndef __RSESGENETICREDUCER_H__
#define __RSESGENETICREDUCER_H__

#include <copyright.h>

#include <kernel/rses/algorithms/rsesstaticreducer.h>

//-------------------------------------------------------------------
// Class.........: RSESGeneticReducer
// Author........: Aleksander 豩rn
// Date..........:
// Description...: Encapsulation class for RSES code performing
//                 reduct calculation using a genetic algorithm.
// Revisions.....:
//===================================================================

class RSESGeneticReducer : public RSESStaticReducer {
public:

	//- Enumerated types...............................................
	enum Speed {SPEED_FAST, SPEED_NORMAL, SPEED_SLOW};

	//- Textual representations........................................
	static String      GetString(Speed speed);

protected:

	//- Algorithm parameters...........................................
	int                seed_;       // Seed to random number generator.
	int                no_reducts_; // Number of reducts to calculate.
	Speed              speed_;      // Calculation speed.

protected:

  //- Methods inherited from RSESStaticReducer.......................
	virtual bool       SetRSESParameters();

public:

  //- Constructors/destructor........................................
  RSESGeneticReducer();
  virtual ~RSESGeneticReducer();

  //- Methods inherited from Identifier..............................
	DECLAREIDMETHODS()

  //- Methods inherited from Algorithm...............................
	virtual String     GetParameters() const;
	virtual bool       SetParameter(const String &keyword, const String &value);

	//- Parameter methods..............................................
	int                GetSeed() const {return seed_;}
	bool               SetSeed(int seed) {seed_ = seed; return true;}

	int                GetNoReducts() const {return no_reducts_;}
	bool               SetNoReducts(int no_reducts) {no_reducts_ = no_reducts; return true;}

  Speed              GetSpeed() const {return speed_;}
	bool               SetSpeed(Speed speed) {speed_ = speed; return true;}

};

#endif

⌨️ 快捷键说明

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