matlabdecisiontableexporter.cpp

来自「The ROSETTA C++ library is a collection 」· C++ 代码 · 共 77 行

CPP
77
字号
//-------------------------------------------------------------------// Author........: Aleksander 豩rn// Date..........:// Description...:// Revisions.....://===================================================================#include <stdafx.h> // Precompiled headers.#include <copyright.h>#include <kernel/algorithms/matlabdecisiontableexporter.h>#include <kernel/system/fstream.h>//-------------------------------------------------------------------// Methods for class MatlabDecisionTableExporter.//===================================================================//-------------------------------------------------------------------// Constructors/destructor.//===================================================================MatlabDecisionTableExporter::MatlabDecisionTableExporter() {}MatlabDecisionTableExporter::~MatlabDecisionTableExporter() {}//-------------------------------------------------------------------// Methods inherited from Identifier.//===================================================================IMPLEMENTIDMETHODS(MatlabDecisionTableExporter, MATLABDECISIONTABLEEXPORTER, DecisionTableExporter)//-------------------------------------------------------------------// Methods inherited from DecisionTableExporter.//===================================================================//-------------------------------------------------------------------// Method........: ExportInformationVector// Author........: Aleksander 豩rn// Date..........:// Description...:// Comments......:// Revisions.....://===================================================================boolMatlabDecisionTableExporter::ExportInformationVector(ofstream &stream, const DecisionTable &table, int object_no, bool masked) const {	int i, no_attributes = table.GetNoAttributes(masked);	// Save numerical entries.	for (i = 0; i < no_attributes; i++) {		String entry;		// Get the entry.		if (table.IsMissing(object_no, i, masked))			entry = "NaN";		else			entry = table.GetEntry(object_no, i, table.IsNumeric(i, masked), masked);		// Dump to file stream.		stream << entry;		if (i < no_attributes - 1)			stream << ' ';		else			stream << endl;	}	return true;}

⌨️ 快捷键说明

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