?? dataadd.h
字號:
/* COPYRIGHT NOTICE This material was developed by Christos Faloutsos and King-Ip Linat the University of Maryland, College Park, Department of Computer Science.Permission is granted to copy this software, to redistribute iton a nonprofit basis, and to use it for any purpose, subject tothe following restrictions and understandings. 1. Any copy made of this software must include this copyright noticein full. 2. All materials developed as a consequence of the use of thissoftware shall duly acknowledge such use, in accordance with the usualstandards of acknowledging credit in academic research. 3. The authors have made no warranty or representation that theoperation of this software will be error-free or suitable for anyapplication, and they are under under no obligation to provide anyservices, by way of maintenance, update, or otherwise. The softwareis an experimental prototype offered on an as-is basis. 4. Redistribution for profit requires the express, written permissionof the authors. */// Author : $Author$// Date : $Date$// Id : $Id$// $Id: data.h,v 1.3 1996/04/18 21:50:24 kilin Exp kilin $ // A key class, used for small, critical info about// the data#define DEFAULT_DATADIM 3class DataPoints { friend istream& operator>>(istream&, DataPoints&); friend istream& operator>>=(istream&, DataPoints&); friend ostream& operator<<(ostream&, DataPoints&); friend ofstream& operator<(ofstream&, DataPoints&);public: DataPoints(); DataPoints(char *); // convert a byte stream to data // input format : <name String>|<address String> DataPoints(char *, char *); DataPoints(const DataPoints&); ~DataPoints(); TVector Initvec(int start, int end); int operator[](int); int Size() const; char* operator()(); // conver data to byte stream DataPoints& operator=(const DataPoints&); int operator==(const DataPoints&) const; float Distance(const DataPoints&); void Initpos(); static int dim; String name; String address; int *position; int *value;// Vector vec; // cheating, storing the data vector};char *ReadData(ifstream&, int&);void PrintData(ostream& of, char *iarray);void WriteData(ofstream& of, char *iarray, int size);VCOM_TYPE GetFeature(int fno, char *iarray);int Equal(char* arr1, char* arr2);float Distance(char* arr1, char* arr2);char *GetKey(char *arr1, int, int&);void PrintKey(ostream& of, char *iarray);
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -