📄 data.h
字号:
/************************************************************************/
/* 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -