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

📄 costinformation.h

📁 ROSETTA C++库是一个C++类库和例程集合
💻 H
字号:
//-------------------------------------------------------------------
// Author........: Aleksander 豩rn
// Date..........:
// Description...:
// Revisions.....:
//===================================================================

#ifndef __COSTINFORMATION_H__
#define __COSTINFORMATION_H__

#include <copyright.h>

#include <kernel/basic/vector.h>

//-------------------------------------------------------------------
// Class prototypes.
//===================================================================

class DecisionTable;
class ifstream;
class Reduct;
class String;

//-------------------------------------------------------------------
// Class.........: CostInformation
// Author........: Aleksander 豩rn
// Date..........:
// Description...: Helper class that keeps information about
//                 attribute costs.
//
// Comments......: To do: Add support for shared costs.
// Revisions.....:
//===================================================================

class CostInformation {
protected:

  //- Member variables..............................................
	Vector(float)         costs_;

protected:

	//- Constructors...................................................
  CostInformation(const CostInformation &in);

public:

  //- Constructor and destructor....................................
	CostInformation();
  virtual ~CostInformation();

  //- Local methods.................................................
  virtual bool          Load(ifstream &stream, const DecisionTable &table, float defaultcost);
  virtual bool          Load(const String &filename, const DecisionTable &table, float defaultcost);

	const Vector(float)  &GetCosts() const {return costs_;}

	virtual float         GetCost(int attribute) const;
	virtual float         GetCost(const Vector(int) &attributes) const;
	virtual float         GetCost(const Reduct &attributes) const;

};

#endif

⌨️ 快捷键说明

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