c第2章数组和结构体.pptVIP

  • 0
  • 0
  • 约4.44千字
  • 约 16页
  • 2018-03-19 发布于河南
  • 举报
c第2章数组和结构体

数组的抽象数据类型 通常的观点 连续的存储单元集合 直观地看 数组是二元组 index, value的集合,对每一个index,都有一个 value值与之对应。 数学名称 映射 数组抽象数据类型 ADT Array is 数据对象:二元组 index, value的集合, 对每一个index,都有一个 相应 的取自集合Item中的value与之对应。 index 是有限的一维或多维有限集合。 成员函数: for all A∈Array, i ∈index, x ∈item, j,size ∈integer Array Create(j, list) ::= return an array of j dimensions where list is a j-tuple whose ith elements is the size of the ith dimension. Items are undefined. Item Retrieve(A, i) ::= if(i ∈index) return the item associated with

文档评论(0)

1亿VIP精品文档

相关文档