⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rsesdynamicreducer.h

📁 粗慥集成算法集合 ,并有详细的文档资料和测试数据处
💻 H
字号:
//-------------------------------------------------------------------
// Author........: Aleksander 豩rn
// Date..........:
// Description...:
// Revisions.....:
//===================================================================

#ifndef __RSESDYNAMICREDUCER_H__
#define __RSESDYNAMICREDUCER_H__

#include <copyright.h>

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

//-------------------------------------------------------------------
// Class.........: RSESDynamicReducer
// Author........: Aleksander 豩rn
// Date..........:
// Description...: Encapsulation class for RSES code performing
//                 dynamic reduct calculation.
// Revisions.....:
//===================================================================

class RSESDynamicReducer : public RSESReducer {
private:

	//- Algorithm parameters...........................................
	Handle<RSESStaticReducer> reducer_;             // Reduct computation algorithm to use.
	int                       seed_;                // Seed to random number generator.
	int                       no_levels_;           // Number of levels.
	int                       no_samples_;          // Number of samples on each level.
	int                       upper_percentage_;    // Relative size of largest sample.
	int                       lower_percentage_;    // Relative size of smallest sample.
	bool                      include_whole_;       // Treat whole table as a sample?

public:

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

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

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

	//- Parameter methods..............................................
	Handle<RSESStaticReducer> GetReducer() const {return reducer_;}
	bool                      SetReducer(const Handle<RSESStaticReducer> reducer) {reducer_ = reducer; return true;}

	int                       GetSeed() const {return seed_;}
	bool                      SetSeed(int seed) {seed_ = seed; return true;}

	int                       GetNoLevels() const {return no_levels_;}
	bool                      SetNoLevels(int no_levels) {no_levels_ = no_levels; return true;}

	int                       GetNoSamples() const {return no_samples_;}
	bool                      SetNoSamples(int no_samples) {no_samples_ = no_samples; return true;}

	int                       GetUpperPercentage() const {return upper_percentage_;}
	bool                      SetUpperPercentage(int upper_percentage) {upper_percentage_ = upper_percentage; return true;}

	int                       GetLowerPercentage() const {return lower_percentage_;}
	bool                      SetLowerPercentage(int lower_percentage) {lower_percentage_ = lower_percentage; return true;}

	bool                      IncludeWholeTable() const {return include_whole_;}
	bool                      IncludeWholeTable(bool include_whole) {include_whole_ = include_whole; return true;}

};

#endif

⌨️ 快捷键说明

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