📄 standardvoter.cpp
字号:
//-------------------------------------------------------------------
// Author........: Aleksander 豩rn
// Date..........: 9608/9609
// Description...:
// Revisions.....:
//===================================================================
#include <stdafx.h> // Precompiled headers.
#include <copyright.h>
#include <kernel/algorithms/standardvoter.h>
#include <kernel/algorithms/keyword.h>
#include <kernel/structures/informationvector.h>
#include <kernel/structures/rule.h>
#include <kernel/structures/reduct.h>
#include <kernel/structures/decisiontable.h>
#include <kernel/structures/rulebasedclassification.h>
#include <kernel/utilities/creator.h>
#include <kernel/basic/message.h>
//-------------------------------------------------------------------
// Methods for class StandardVoter.
//===================================================================
//-------------------------------------------------------------------
// Constructors/destructor.
//===================================================================
//-------------------------------------------------------------------
// Method........: Constructor
// Author........: Aleksander 豩rn
// Date..........:
// Description...:
// Comments......:
// Revisions.....:
//===================================================================
StandardVoter::StandardVoter() {
SetVotingStrategy(VOTING_SUPPORT);
SetNormalizationStrategy(NORMALIZATION_FIRING);
ExcludeGeneralizations(false);
}
//-------------------------------------------------------------------
// Method........: Destructor
// Author........: Aleksander 豩rn
// Date..........:
// Description...:
// Comments......:
// Revisions.....:
//===================================================================
StandardVoter::~StandardVoter() {
}
//-------------------------------------------------------------------
// Methods inherited from Identifier.
//===================================================================
IMPLEMENTIDMETHODS(StandardVoter, STANDARDVOTER, Voter)
//-------------------------------------------------------------------
// Methods inherited from Algorithm.
//===================================================================
//-------------------------------------------------------------------
// Method........: GetParameters
// Author........: Aleksander 豩rn
// Date..........:
// Description...:
// Comments......:
// Revisions.....:
//===================================================================
String
StandardVoter::GetParameters() const {
String parameters;
// Get parameters higher up.
parameters += Voter::GetParameters();
parameters += Keyword::Separator();
// Exclude generalizations (choose most specific rule).
parameters += Keyword::Specific();
parameters += Keyword::Assignment();
parameters += String::Format(ExcludeGeneralizations());
parameters += Keyword::Separator();
// Voting strategy.
parameters += Keyword::Voting();
parameters += Keyword::Assignment();
parameters += GetString(GetVotingStrategy());
parameters += Keyword::Separator();
// Normalization strategy.
parameters += Keyword::Normalization();
parameters += Keyword::Assignment();
parameters += GetString(GetNormalizationStrategy());
return parameters;
}
//-------------------------------------------------------------------
// Method........: SetParameter
// Author........: Aleksander 豩rn
// Date..........:
// Description...:
// Comments......:
// Revisions.....: A
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -