partitionkit.h

来自「The ROSETTA C++ library is a collection 」· C头文件 代码 · 共 64 行

H
64
字号
//-------------------------------------------------------------------// Author........: Aleksander 豩rn// Date..........:// Description...:// Revisions.....://===================================================================#ifndef __PARTITIONKIT_H__#define __PARTITIONKIT_H__#include <copyright.h>#include <kernel/basic/vector.h>//-------------------------------------------------------------------// Class prototypes.//===================================================================class DecisionTable;class Reduct;class String;//-------------------------------------------------------------------// Class.........: PartitionKit// Author........: Aleksander 豩rn// Date..........:// Description...: Utility functions for computing the equivalence//                 classes in a decision table.// Revisions.....://===================================================================class PartitionKit {private:	//- STL comparator.................................................	struct Compare {	private:		//- Private variables............................................		const DecisionTable *table_;		bool                 masked_;		const Vector(int)   *attributes_;	public:		//- Constructor..................................................		Compare(const DecisionTable &table, bool masked, const Vector(int) &attributes) {table_ = &table, masked_ = masked; attributes_ = &attributes;}		//- Comparison operator..........................................		bool operator()(int i, int j) const;	};public:	//- Partitioning methods...........................................	static bool ComputePartitionIndices(Vector(int) &indices, int &no_partitions, const DecisionTable &table, bool all, bool masked, Vector(int) *cardinalities = NULL);	static bool ComputePartitionIndices(Vector(int) &indices, int &no_partitions, const Reduct &attributes, const DecisionTable &table, bool masked, Vector(int) *cardinalities = NULL);	static bool ComputePartitionIndices(Vector(int) &indices, int &no_partitions, const String &attributes, const DecisionTable &table, bool masked, Vector(int) *cardinalities = NULL);	static bool ComputePartitionIndices(Vector(int) &indices, int &no_partitions, const Vector(int) &attributes, const DecisionTable &table, bool masked, Vector(int) *cardinalities = NULL);};#endif

⌨️ 快捷键说明

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