📄 rsesrules.h
字号:
//-------------------------------------------------------------------
// Author........: Aleksander 豩rn
// Date..........:
// Description...:
// Revisions.....:
//===================================================================
#ifndef __RSESRULES_H__
#define __RSESRULES_H__
#include <copyright.h>
#include <kernel/structures/rules.h>
//-------------------------------------------------------------------
// Class prototypes.
//===================================================================
class RSESRule;
class TRedRulMem;
class TReduct;
//-------------------------------------------------------------------
// Class.........: RSESRules
// Author........: Aleksander 豩rn
// Date..........:
// Description...: Wrapper class for a set of RSES rules.
// Comments......: Contains a pointer to the RSES TRedRulMem object
// which logically belongs to (and is "owned" by)
// the parent reduct set.
// Revisions.....:
//===================================================================
class RSESRules : public Rules {
private:
//- Friend declarations............................................
friend class RSESClassifier;
friend class RSESReducts;
friend class RSESRuleGenerator;
private:
//- Private variables..............................................
TRedRulMem *rules_; // From the RSES library.
bool is_owner_; // Does this wrapper "own" the embedded TRedRulMem object?
private:
//- Build individual wrappers from scratch.........................
bool BuildWrappers();
//- Take and propagate ownership...................................
void TakeOwnership(bool ownership);
//- Rule management related to a specific parent reduct............
int GetNoRules(const TReduct &rsesreduct, int index) const;
Rule *GetRule(int i, const TReduct &rsesreduct, int index) const;
bool InsertRule(RSESRule *rule, int i, TReduct &rsesreduct, bool verify, int index);
bool AppendRule(RSESRule *rule, TReduct &rsesreduct, bool verify, int index);
bool RemoveRule(int i, TReduct &rsesreduct, int index);
bool RemoveAllRules(TReduct &rsesreduct, int index);
protected:
//- Constructor....................................................
RSESRules(const RSESRules &in);
public:
//- Constructors/destructor........................................
RSESRules();
virtual ~RSESRules();
//- Methods inherited from Identifier..............................
DECLAREIDMETHODS()
//- Methods inherited from Persistent..............................
virtual bool Load(ifstream &stream);
virtual bool Save(ofstream &stream) const;
//- Methods inherited from Structure...............................
virtual Structure *Duplicate() const;
virtual void Clear();
//- Methods inherited from Structures..............................
virtual bool InsertStructure(Structure *structure, int i);
virtual bool RemoveStructure(int i);
virtual bool RemoveAllStructures();
//- Methods inherited from Rules...................................
virtual bool Sort(int property, bool ascending, const Handle<DecisionTable> table);
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -