data.h
来自「一个简单灵活的数据挖掘实验平台」· C头文件 代码 · 共 31 行
H
31 行
/************************************************************************/
/* AUTHOR: Leiming Hong */
/* INST.: South China Univ. of Tech. */
/* Date: 2005-09-26 */
/* FUNC: Vector represents an instance */
/************************************************************************/
#ifndef _DATA_H_
#define _DATA_H_
#include <vector>
using namespace std;
class Data
{
public:
Data(int size);
Data(const double* values,int size);
Data(vector<double> values);
Data(const Data& data);
~Data();
public:
int size() const;
double get_weight() const;
void set_weight(double weight);
/** Gets and sets the double value of without checking bounds*/
double& operator[](int index);
string to_string();
protected:
int _size; //: length of the double values
double _weight; //: weight of the mining vector
double* _values; //: double array values
};
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?