正在加载图片...
Chapter 4 Data Structure 4.1 An Introduction to Data Structures Reusability Data structures are reusable because they tend to be modular and context-free. They are modular because each has a prescribed interface through which access to data stored in the data structure is restricted. That is, we access the data using only those operations the interface defines Data structures are context-free because they can be used with any type of data and in a variety of situations or contexts. In C, we make a data structure store data of any type by using void pointers to the data rather than by maintaining private copies of the data in the data structure itself. 复用性:因为数据结构趋向于模块化并和环境无关,所以数据结构是可以 复用的。因为每种结构有一个预定的接口通过该接口限制访问存储在数据 结构中的数据,所以它们是模块化的。也就是说我们只能使用接口定义的 那些操作来访问数据。因为数据结构能用于任何类型的数据并用于多种环 境中,所以数据结构与使用环境无关。在C语言中,我们通过使用空指针 而不是通过维护非公开的数据备份,使数据结构存储任何类型的数据。 计算机专业英语 48Chapter 4 Data Structure 计算机专业英语 4-8 Reusability Data structures are reusable because they tend to be modular and context-free. They are modular because each has a prescribed interface through which access to data stored in the data structure is restricted. That is, we access the data using only those operations the interface defines. Data structures are context-free because they can be used with any type of data and in a variety of situations or contexts. In C, we make a data structure store data of any type by using void pointers to the data rather than by maintaining private copies of the data in the data structure itself. 复用性:因为数据结构趋向于模块化并和环境无关,所以数据结构是可以 复用的。因为每种结构有一个预定的接口,通过该接口限制访问存储在数据 结构中的数据,所以它们是模块化的。也就是说,我们只能使用接口定义的 那些操作来访问数据。因为数据结构能用于任何类型的数据,并用于多种环 境中,所以数据结构与使用环境无关。在C语言中,我们通过使用空指针, 而不是通过维护非公开的数据备份,使数据结构存储任何类型的数据。 4.1 An Introduction to Data Structures
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有