⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme

📁 TV-tree的c实现源码
💻
字号:
This is an implementation of the TV tree for general purpose. It can be used to index different data types. The following notes provide help in using the TV-treeeffectively.    (1) What is included:-- The basic code for the TV-tree (all the file that starts with TV),    written in C++.-- Two sample applications for reference:   -- (1) A simple integer file: uses the following files		data.h, data.C, tvtest2.C and testnum   -- (2) A list of addresses : uses the following files		dataadd.h dataadd.C indextest.h indextest.C & xaa(2) How to incoporate your own datatype with the TV-tree.    The basic steps include the following:    (1) Create a C++ class for the object you want to index.	Your class should support the following constructor		-- Class(char *) : Converts a character array storing the			   byte pattern of the element into an			   element of the class. 	Also you class should have a method to return the n-th feature	of an object of the class.    (2) Create a set of (non-member) functions, which takes in a character	array (storing the byte pattern of the element) and transform it	to objects of your class and perform the functions	-- char *ReadData(ifstream& is, int size);  	     	  Description : This function should read in one item			of your class, and store it in a character array.		-- void PrintData(ofstream& of, char *iarray)    	  Description : This function will convert the content in your			character array into the class you want and print it				-- void WriteData(ofstream& of, char *iarray, int size)    	  Description : This function will store the raw byte format 			of the data in the array.	-- VCOM_TYPE GetFeature(int fno, char *iarray)	  Decsription : This function return the fno-th feature of the element	-- int Equal(char* arr1, char* arr2);	  Description : check if object arr1 = object arr2	-- float Distance(char* arr1, char* arr2);	  Description : Return the distance between the 2 objects	-- char *GetKey(char *arr1, int size, int& ressize);		  Description : Return the 'key' of the array, the return size is stored in			ressize 	-- char PrintKey(ostream& of, char *iarray);	  Description : Print the key value.   (3) Call the TV-tree using the following functions:	Insertion : TVTree& Insert(char *e, int size, VCOM_TYPE (*gfeat)(int, char*));		e -- pointer to element		size -- size of element		gfeat -- the GetFeature() function	Search : Refer to the TVindex.h file for details.(3) The file xaa, xab, xac contains addresses for you to test    while the file testnum can be used to test numeric data (note that    this might not work in your machine, this is binary numbers    generated by an ultraSparc 1)

⌨️ 快捷键说明

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