classifier.cpp

来自「粗糙集应用软件」· C++ 代码 · 共 118 行

CPP
118
字号
//-------------------------------------------------------------------
// Author........:
// Date..........:
// Description...:
// Revisions.....:
//===================================================================

#include <stdafx.h> // Precompiled headers.
#include <copyright.h>

#include <kernel/algorithms/classifier.h>

#include <kernel/structures/informationvector.h>

//-------------------------------------------------------------------
// Methods for class Classifier.
//===================================================================

//-------------------------------------------------------------------
// Constructors/destructor.
//===================================================================

Classifier::Classifier() {
}

Classifier::~Classifier() {
}

//-------------------------------------------------------------------
// Methods inherited from Identifier.
//===================================================================

IMPLEMENTIDMETHODS(Classifier, CLASSIFIER, Algorithm)

//-------------------------------------------------------------------
// Methods inherited from Algorithm.
//===================================================================

//-------------------------------------------------------------------
// Method........: IsApplicable
// Author........: Aleksander 豩rn
// Date..........:
// Description...:
// Comments......:
// Revisions.....:
//===================================================================

bool
Classifier::IsApplicable(const Structure &structure, bool /*warn*/) const {
	return structure.IsA(INFORMATIONVECTOR);
}

//-------------------------------------------------------------------
// New virtual methods.
//===================================================================

//-------------------------------------------------------------------
// Method........: IsCompatible
// Author........: Aleksander 豩rn
// Date..........:
// Description...: Is the classifier compatible with information vectors
//                 extracted from the given decision table?
// Comments......:
// Revisions.....:
//===================================================================

bool
Classifier::IsCompatible(const DecisionTable &/*table*/, bool /*masked*/) const {
	return true;
}

//-------------------------------------------------------------------
// Method........: Reset
// Author........: Aleksander 豩rn
// Date..........:
// Description...: Can be overloaded in case the derived classifier
//                 needs to be reset somehow between classifications.
// Comments......:
// Revisions.....:
//===================================================================

bool
Classifier::Reset() {
	return true;
}

//-------------------------------------------------------------------
// Method........: Initialize
// Author........: Aleksander 豩rn
// Date..........:
// Description...: Can be overloaded in case the derived classifier
//                 needs to be initialized somehow before batch
//                 classification commences.
// Comments......:
// Revisions.....:
//===================================================================

bool
Classifier::Initialize(const DecisionTable &/*table*/, bool /*masked*/) {
	return true;
}

//-------------------------------------------------------------------
// Method........: SetRules
// Author........: Aleksander 豩rn
// Date..........:
// Description...: To make interface uniform for rule-based and
//                 non-rule-based classifiers.Typically overloaded by
//                 rule-based classifiers.
// Comments......:
// Revisions.....:
//===================================================================

bool
Classifier::SetRules(const Rules * /*rules*/) {
	return false;
}

⌨️ 快捷键说明

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