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

📄 conditionedcompleter.cpp

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

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

#include <kernel/algorithms/conditionedcompleter.h>
#include <kernel/algorithms/valuesplitter.h>
#include <kernel/algorithms/keyword.h>

#include <kernel/structures/decisiontable.h>
#include <kernel/structures/decisiontables.h>

#include <kernel/basic/message.h>

//-------------------------------------------------------------------
// Methods for class ConditionedCompleter.
//===================================================================

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

ConditionedCompleter::ConditionedCompleter() {
}

ConditionedCompleter::~ConditionedCompleter() {
}

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

IMPLEMENTIDMETHODS(ConditionedCompleter, CONDITIONEDCOMPLETER, Completer)

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

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

String
ConditionedCompleter::GetParameters() const {

	String parameters;

	parameters += Keyword::Completer();
	parameters += Keyword::Assignment();

	if (GetCompleter() == NULL) {
		parameters += "NULL";
		return parameters;
	}
	else {
		parameters += IdHolder::GetClassname(GetCompleter()->GetId());
	  parameters += Keyword::Separator();
	  parameters += GetCompleter()->GetParameters();
	}

	return parameters;

}

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

bool
ConditionedCompleter::SetParameter(const String &keyword, const String &value) {

	// The completer cannot (currently) be set this way.
	if (keyword == Keyword::Completer())
		return false;

	// Could the parameters concern the embedded completer?
	if (GetCompleter() == NULL)
		return false;

	return GetCompleter()->SetParameter(keyword, value);

}

//-------------------------------------------------------------------
// Method........: Apply
// Author........: Aleksander 豩rn
// Date..........:
// Description...: Conditions completion on the decision classes.
// Comments......: Simple (non-optimized) algorithm:
//
//                  1) Split the input table into several subtables,
//                     each containing separate decision classes.
//                  2) Do unconditoned completion for each
//                     subtable.
//                  3) Combine the completed subtables into a single
//                     table.
//
// Revisions.....: A

⌨️ 快捷键说明

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