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

📄 filter.h

📁 粗糙集应用软件
💻 H
字号:
//-------------------------------------------------------------------
// Author........: Aleksander 豩rn
// Date..........:
// Description...:
// Revisions.....:
//===================================================================

#ifndef __FILTER_H__
#define __FILTER_H__

#include <copyright.h>

#include <kernel/algorithms/algorithm.h>

//-------------------------------------------------------------------
// Class prototypes.
//===================================================================

class Structures;

//-------------------------------------------------------------------
// Class.........: Filter
// Author........: Aleksander 豩rn
// Date..........:
// Description...: A filter is an algorithm that operates on a set of
//                 structures, and removes members of this set
//                 according to some filtering criterion.
//
// Revisions.....: Previously named Pruner
//===================================================================

class Filter : public Algorithm {
protected:

  //- Parameters.....................................................
	bool                   invert_logic_; // Invert filtering logic?

protected:

	//- Filtering decision.............................................
	virtual bool           Remove(const Structures &structures, int i) const = 0;

public:

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

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

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

	//- Parameter management...........................................
	bool                   InvertLogic() const {return invert_logic_;}
	bool                   InvertLogic(bool invert_logic) {invert_logic_ = invert_logic; return true;}

};

#endif

⌨️ 快捷键说明

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