亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? rsesreducts.cpp

?? 粗慥集成算法集合 ,并有詳細(xì)的文檔資料和測(cè)試數(shù)據(jù)處
?? CPP
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):
//-------------------------------------------------------------------
// Author........: Aleksander 豩rn
// Date..........:
// Description...:
// Revisions.....:
//===================================================================

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

#include <kernel/rses/structures/rsesreducts.h>
#include <kernel/rses/structures/rsesreduct.h>
#include <kernel/rses/structures/rsesrules.h>
#include <kernel/rses/structures/rsesdecisiontable.h>

#include <kernel/rses/library/trr_mem.h>
#include <kernel/rses/library/treduct.h>
#include <kernel/rses/library/err.h>

#include <kernel/utilities/iokit.h>
#include <kernel/utilities/creator.h>
#include <kernel/utilities/discerner.h>

#include <kernel/basic/message.h>

#include <common/configuration.h>

//-------------------------------------------------------------------
// Methods for class RSESReducts.
//===================================================================

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

//-------------------------------------------------------------------
// Method........: Copy constructor.
// Author........: Aleksander 豩rn
// Date..........:
// Description...:
// Comments......: The input structure should be passed on up the
//                 hierarchy with some steps skipped!  Ideally, the
//                 input argument should be passed on directly to
//                 the AnnotatedStructure level.  This is necessary to
//                 ensure wrapper consistency.  However, skipping of such
//                 steps are not allowed.
//
// Revisions.....: Duplicates embedded rule children as well.
//===================================================================

RSESReducts::RSESReducts(const RSESReducts &in) {

	// This wrapper "owns" the newly created (duplicated) RSES object.
	is_owner_ = true;

	// Is the input empty?
	if (in.reducts_ == NULL) {
		reducts_ = NULL;
		return;
	}

	// Create a virgin RSES reduct and rule memory.
	try {
		reducts_ = new TRedRulMem();
	}
	catch (Error &error) {
		Message::RSESError("Error creating RSES reduct and rule memory.", error.GetMessage());
		reducts_ = NULL;
		return;
	}

	int no_reducts = in.GetNoReducts();

	// Any reducts to duplicate?
	if (no_reducts == 0)
		return;

	// Duplicate embedded input objects.
	try {

		int i;

		// Duplicate them in the order the wrappers are arranged.
		for (i = 0; i < no_reducts; i++) {

			// Get the current reduct wrapper.
			Handle<RSESReduct> wrapper = dynamic_cast(RSESReduct *, in.GetReduct(i));

			// Duplicate the embedded RSES reduct.
			TReduct *duplicate  = new TReduct();
			TReduct *rsesreduct = wrapper->reduct_;

			*duplicate = *rsesreduct;

			// Add it to this set of embedded RSES reducts.
			reducts_->AddRed(duplicate);

		}

	}

	// Catch any exceptions thrown by RSES.
	catch (Error &error) {
		Message::RSESError("Failed to duplicate embedded RSES reducts.", error.GetMessage());
		delete reducts_;
		reducts_ = NULL;
		return;
	}

#if 0
	// Embedded children are not duplicated.
	try {
		if (reducts_->NoRules() != 0)
		  reducts_->ClearRules();
	}
	catch (Error &error) {
		Message::RSESError("Failed to clear rules associated with embedded RSES reducts.", error.GetMessage());
	}
#endif

	// Build wrappers.
	if (!BuildWrappers())
		Message::Error("Error building individual reduct wrappers.");

	// Stuff higher up in the hierarchy should be handled better (cf. comments above).
	if (in.GetAnnotation() != NULL)
		SetAnnotation(dynamic_cast(Annotation *, in.GetAnnotation()->Duplicate()));

}

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

RSESReducts::RSESReducts() {

	// Create a virgin RSES reduct and rule memory.
	try {
		reducts_ = new TRedRulMem();
	}
	catch (Error &error) {
		Message::RSESError("Error creating RSES reduct and rule memory.", error.GetMessage());
		reducts_ = NULL;
	}

	// This wrapper "owns" the newly created RSES object.
	is_owner_ = true;

}

//-------------------------------------------------------------------
// Method........: Destructor.
// Author........: Aleksander 豩rn
// Date..........:
// Description...:
// Comments......: Since any derived RSESRules object contains a pointer
//                 to the same TRedRulMem presumabky "owned" by this set,
//                 take care of ownership.
// Revisions.....:
//===================================================================

RSESReducts::~RSESReducts() {

	// Exit if this wrapper is not responsible for dealing with the
	// embedded object.
	if (!is_owner_)
		return;

	bool transfer = false;

	int j;

	// Transfer ownership to a RSES rule set child, if any.
	for (j = 0; j < GetNoChildren(); j++) {

		Handle<Structure> child = GetChild(j);

		if (!child->IsA(RSESRULES))
			continue;

		Handle<RSESRules> rules  = dynamic_cast(RSESRules *, child.GetPointer());

		// Transfer ownership, if not already done.
		if (rules->rules_ == reducts_) {
			rules->TakeOwnership(!transfer);
			transfer = true;
		}

	}

	// If ownership was not transferred, delete the embedded RSES object.
	if (!transfer)
		delete reducts_;

}

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

IMPLEMENTIDMETHODS(RSESReducts, RSESREDUCTS, Reducts)

//-------------------------------------------------------------------
// Methods inherited from Persistent.
//===================================================================

//-------------------------------------------------------------------
// Method........: Load
// Author........: Aleksander 豩rn
// Date..........:
// Description...:
// Comments......: Since a RSESReducts object physically contains the
//                 data that logically belongs in a RSESRules child
//                 object, special considerations are made.
// Revisions.....:
//===================================================================

bool
RSESReducts::Load(ifstream &stream) {

	// Load stuff higher up (skip the Structures and ParentStructures levels).
	if (!AnnotatedStructure::Load(stream))
		return false;

	// Delete the current reduct and rule memory.
	delete reducts_;

	// Create a new "virgin" RSES library object.
	try {
		reducts_ = new TRedRulMem();
	}
	catch (Error &error) {
		Message::RSESError("Error creating embedded RSES reduct and rule memory.", error.GetMessage());
		reducts_ = NULL;
		return false;
	}

	/*
	// RSES Version 1.3.
	Message::Warning("RSESReducts I/O temporarily disabled due to a bug in the RSES library.");
	return true;
	*/

	// Read a newline character so that the RSES I/O does not get confused.
	char dummy[10];
  stream.getline(dummy, sizeof(dummy), '\n');

	// Let the embedded object load itself.
	try {
		reducts_->LoadMemory(stream);
	}
	catch (Error &error) {
		Message::RSESError("Error loading embedded RSES reduct and rule memory.", error.GetMessage());
		return false;
	}

	// In case the RSES code calls the stop function...
	//Message::Reset();

	int no_children;

	// Load the number of children.
	if (!IOKit::Load(stream, no_children))
		return false;

	Handle<RSESRules> rules;

	int i;

	// Load the children recursively.
  for (i = 0; i < no_children; i++) {

		String type;

		// Load the type description of the child.
		if (!IOKit::Load(stream, type))
			return false;

		// Reconstruct the type of the child.
		Id id = IdHolder::GetId(type);

		if (id == Undefined::Id()) {
			Message::Error("Unknown child type identifier (" + type + ").");
			return false;
		}

		// Create a new child.
		Handle<Structure> child = Creator::Create(id);

		// Let the child load itself.
		if (!child->Load(stream))
			return false;

		// Keep a handle to pass to BuildWrappers.
		if (child->IsA(RSESRULES))
			rules = dynamic_cast(RSESRules *, child.GetPointer());

		// Append the child to the list of children.
		if (!AppendChild(child.GetPointer()))
			return false;

	}

	// Build wrappers for reducts and rules.
	if (!BuildWrappers(rules.GetPointer())) {
		Message::Error("Error building wrappers.");
		return false;
	}

	return true;

}

//-------------------------------------------------------------------
// Method........: Save
// Author........: Aleksander 豩rn
// Date..........:
// Description...:
// Comments......: Cf. Load method comments.
// Revisions.....:
//===================================================================

bool
RSESReducts::Save(ofstream &stream) const {

	// Save stuff higher up (skip the Structures and ParentStructures levels).
	if (!AnnotatedStructure::Save(stream))
		return false;

#if 0 // RSES Version 1.3.
	Message::Warning("RSESReducts I/O temporarily disabled due to a bug in the RSES library.");

	return true;
#endif

	Message::Warning("Reduct set (and any derived rules) saved unsorted.", false);

	// To ensure that stop function displays correct text.
	Configuration::Kernel::RSES::IsSavingRRMemory(true);

	// Let the embedded object save itself.
	try {
		reducts_->SaveMemory(stream);
	}
	catch (Error &error) {
		Message::RSESError("Error saving embedded RSES reduct and rule memory.", error.GetMessage());
		Configuration::Kernel::RSES::IsSavingRRMemory(false);
		return false;
	}

	// To ensure that stop function displays correct text.
	Configuration::Kernel::RSES::IsSavingRRMemory(false);

	// In case the RSES code calls the stop function...
	//Message::Reset();

	// Save the number of children.
	if (!IOKit::Save(stream, GetNoChildren()))
		return false;

	if (!IOKit::Save(stream, '\n'))
		return false;

	int i;

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产综合色产在线精品| 97超碰欧美中文字幕| 国产免费观看久久| 欧美午夜精品一区二区蜜桃| 国内精品伊人久久久久影院对白| 综合久久综合久久| 精品国产91乱码一区二区三区| 一本到高清视频免费精品| 韩国精品主播一区二区在线观看 | 亚洲欧美日韩电影| 久久久久久影视| 欧美一区二区免费视频| 在线中文字幕不卡| 成人app在线观看| 国产一区二区三区四区五区入口| 日韩福利视频网| 亚洲一区二区三区四区在线免费观看 | 欧美综合视频在线观看| 国产一区二区影院| 美女视频免费一区| 午夜精品福利一区二区蜜股av| 日韩码欧中文字| 国产日韩欧美综合一区| 久久久久一区二区三区四区| 欧美电影免费观看高清完整版在 | 欧美日韩一二三| 91久久精品一区二区三区| 9i在线看片成人免费| 成人av小说网| 粉嫩久久99精品久久久久久夜| 国产老妇另类xxxxx| 看电影不卡的网站| 久久精品99国产精品日本| 日本不卡123| 日本va欧美va精品发布| 美腿丝袜在线亚洲一区| 日韩电影在线一区二区三区| 日韩在线观看一区二区| 无吗不卡中文字幕| 免费一级欧美片在线观看| 日韩国产一二三区| 美国一区二区三区在线播放| 精品影院一区二区久久久| 激情文学综合插| 国产一区二区三区不卡在线观看 | 91原创在线视频| 色综合激情五月| 欧美三日本三级三级在线播放| 在线免费视频一区二区| 欧美精品一卡两卡| 欧美一级xxx| 久久夜色精品国产噜噜av| 日本一区二区免费在线| 一区在线观看免费| 亚洲成人动漫精品| 久久精品国产99国产精品| 国产91精品在线观看| 99久久er热在这里只有精品15| 日本精品裸体写真集在线观看| 欧美性生活影院| 欧美成人免费网站| 国产精品久久久久婷婷| 亚洲国产精品久久人人爱| 青青草精品视频| 国产91富婆露脸刺激对白| 91在线观看下载| 欧美精品视频www在线观看| 久久看人人爽人人| 亚洲日本中文字幕区| 男女激情视频一区| 国产99一区视频免费 | 777亚洲妇女| 久久久久久久久一| 亚洲色图视频网站| 免费不卡在线观看| 成人激情黄色小说| 欧美日本一区二区三区| 久久精品日产第一区二区三区高清版| 成人欧美一区二区三区黑人麻豆 | 99久久国产综合精品色伊| 欧美三级视频在线播放| 精品99一区二区三区| 中文字幕制服丝袜一区二区三区 | 色爱区综合激月婷婷| 日韩精品一区二区三区中文不卡| 国产精品久久久久久久久免费丝袜 | 成人免费高清视频在线观看| 欧美美女黄视频| 国产精品免费久久| 日精品一区二区三区| 成人毛片老司机大片| 制服丝袜亚洲网站| 亚洲人123区| 国产精品一区不卡| 欧美巨大另类极品videosbest| 国产精品狼人久久影院观看方式| 免费xxxx性欧美18vr| 色999日韩国产欧美一区二区| 久久先锋影音av| 午夜精品久久久久久久| 99视频精品在线| 精品国产乱码久久久久久影片| 亚洲午夜国产一区99re久久| 成人美女视频在线看| 欧美精品一区二区三区蜜桃| 亚洲妇熟xx妇色黄| 色999日韩国产欧美一区二区| 久久精品亚洲一区二区三区浴池 | 国产无一区二区| 免费观看30秒视频久久| 91精品1区2区| 亚洲欧洲精品成人久久奇米网| 韩国三级电影一区二区| 3d成人h动漫网站入口| 亚洲精选一二三| 成人av电影在线观看| 久久亚洲免费视频| 日本成人在线电影网| 欧美日韩视频第一区| 有码一区二区三区| kk眼镜猥琐国模调教系列一区二区 | 国产一区二区三区av电影| 日韩欧美中文字幕精品| 午夜影院久久久| 在线精品观看国产| 一区二区三区欧美日韩| 91视频91自| 亚洲视频在线一区| 色菇凉天天综合网| 夜夜亚洲天天久久| 一本色道久久综合亚洲精品按摩| 亚洲欧美综合在线精品| 99久久99久久综合| |精品福利一区二区三区| 波多野结衣91| 日韩伦理av电影| 色综合久久中文综合久久牛| 亚洲日本在线a| 在线精品视频一区二区三四| 一片黄亚洲嫩模| 欧美三区在线视频| 日本色综合中文字幕| 日韩三级精品电影久久久| 激情综合五月婷婷| 久久精品水蜜桃av综合天堂| 福利一区二区在线观看| 亚洲欧洲av一区二区三区久久| 色哟哟亚洲精品| 亚洲午夜久久久久中文字幕久| 欧美精品丝袜中出| 国产一区久久久| 中文字幕第一区二区| 色噜噜狠狠色综合中国| 亚洲国产裸拍裸体视频在线观看乱了| 欧美日韩国产精品自在自线| 日韩精品久久久久久| 欧美大片顶级少妇| 波多野结衣亚洲一区| 亚洲国产综合在线| 日韩欧美一区二区视频| 国产精品一二三| 亚洲男女一区二区三区| 欧美美女bb生活片| 国产精品18久久久久久vr| 中文字幕五月欧美| 欧美日韩精品一区二区三区 | 亚洲欧洲精品一区二区三区不卡 | 欧日韩精品视频| 美女视频一区二区三区| 国产精品二区一区二区aⅴ污介绍| 色婷婷综合久色| 久久精品国产第一区二区三区| 亚洲国产精品激情在线观看| 欧美性猛片aaaaaaa做受| 狠狠色丁香婷婷综合久久片| ...av二区三区久久精品| 宅男在线国产精品| 成人免费视频免费观看| 日韩一区欧美二区| 欧美激情一区二区三区在线| 欧美日韩一区二区三区视频| 国产高清视频一区| 一区二区三区.www| 久久久99精品免费观看不卡| 欧美日韩一区中文字幕| 国产成人在线免费| 日韩高清一级片| 最近日韩中文字幕| 精品乱人伦一区二区三区| 97成人超碰视| 国产精品一区二区久激情瑜伽| 亚洲成va人在线观看| 国产精品免费视频一区| 日韩午夜激情免费电影| 在线欧美日韩国产| 盗摄精品av一区二区三区| 久久成人久久爱| 婷婷久久综合九色国产成人| 亚洲精选视频在线| 欧美激情一区不卡|