Advance Data StructureReview of Chapter 2.ppt

  1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Advance Data StructureReview of Chapter 2.ppt

Advance Data Structure Review of Chapter 2 張啟中 Review of Chapter 2 Arrays 1.3 Data Abstraction and Encapsulation 2.2 The Array As An abstract Data Type 2.5 The Representation of Arrays Example 2.3 The Polynomial Abstract Data Type 2.4 The Sparse Matrix Abstract Data Type 2.6 The String Abstract Data Type 資料型態 Data Types Primitive Data Types Accumulated Data Types - Array - Structures - Union Abstract Data Types Examples Example: Data Type of C++ Accumulated Data Type Array Struct Union 如何理解 Abstract Data Types ADTs 是一個物件的型態的抽象定義具有一般化的特性,其中也包含這個物件相關的操作。 Data Structures 課程,旨在瞭解每一個 ADT,要用什麼樣的結構來表達與儲存,而這樣的表達與儲存方式,又對於該物件的操作帶來什麼樣的優缺點。亦即關注在二個重點: 物件儲存與表達方式(資料結構) 物件操作方式(演算法) The Array as an Abstract Data Type Array A collection of data of the same type An array is usually implemented as a consecutive set of memory locations int list[5], *plist[5] ADT definition of an Array More general structure than a consecutive set of memory locations.“ An array is a set of pairs, index, value, in mathematical, call correspondence or mapping class GeneralArray { // objects: A set of pairs index, value where for each value of index in // IndexSet there is a value of type float. IndexSet is a finite ordered set of one // or more dimensions, for example, {0, …, n - 1} for one dimension, {(0, 0), // (0, 1), (0, 2), (1, 0), (1, 1), (1, 2), (2, 0), (2, 1), (2, 2)} for two dimensions, etc. public: GeneralArray(int j, RangeList list, float initValue = defaultValue) ; // The constructor GeneralArray creates a j dimensional array of floats; the // range of the kth dimension is given by the kth element of list. For each // index i in the index set, insert i, initValue into the array. float Retrieve(index i) ; // if (i is in the index set of the array) return the float associated with i in the // array; else signal an error. void Store(index i, float x) ; // if (i is in the index set of the array) delete any pair of the form i, y // pre

文档评论(0)

gsgtshb + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档