ksinformationvector.h

来自「粗糙集应用软件」· C头文件 代码 · 共 69 行

H
69
字号
//-------------------------------------------------------------------
// Author........: Aleksander 豩rn
// Date..........:
// Description...:
// Revisions.....:
//===================================================================

#ifndef __KSINFORMATIONVECTOR_H__
#define __KSINFORMATIONVECTOR_H__

#include <copyright.h>

#include <kernel/structures/informationvector.h>

#include <kernel/basic/vector.h>

//-------------------------------------------------------------------
// Class.........: KSInformationVector
// Author........: Aleksander 豩rn
// Date..........:
// Description...: A simple realization of an inf. vector.
// Comments......: A perhaps better implementation than a vector would
//                 be to keep a pointer to a decision table and an
//                 object index. Then, one get the masking stuff for
//                 free, in addition to not having to copy data back and
//                 forth. On the downside, there'd be data consistency
//                 issues and I/O..
// Revisions.....:
//===================================================================

class KSInformationVector : public InformationVector {
protected:

	//- Member variables...............................................
	Vector(int)        inf_;

protected:

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

public:

  //- Constructor and destructor....................................
	KSInformationVector();
	KSInformationVector(int size);
  virtual ~KSInformationVector();

  //- Methods inherited from Identifier.............................
	DECLAREIDMETHODS()

  //- Methods inherited from Structure..............................
  virtual Structure *Duplicate() const;

  //- Access methods................................................
	virtual int        GetNoAttributes() const;

	virtual int        GetEntry(int attribute_no) const;
  virtual bool       SetEntry(int attribute_no, int value);

  //- Attribute administration......................................
  virtual bool       InsertAttribute(int attribute_no);
  virtual bool       RemoveAttribute(int attribute_no);

	virtual bool       Reserve(int no_attributes);

};

#endif

⌨️ 快捷键说明

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