第三章 多维数组及广义表.pptVIP

  • 5
  • 0
  • 约1.08万字
  • 约 37页
  • 2017-06-17 发布于湖北
  • 举报
第三章 多维数组和广义表 数组可以看成是一种特殊的线性表,即线性表中数据元 素本身也是一个线性表。 例如二维数组 数组的两种顺序存储结构 以行序为主序(行优先顺序) 以列序为主序(列优先顺序) 3.2 矩阵的压缩存储 3.2.1 特殊矩阵 1. 对称矩阵 2. 三角矩阵(下三角) 3.2.2 特殊矩阵的抽象数据类型 ADT SpecialMatrix is Data: 特殊矩阵线性表M=(a1,……an, an+1), Matrix为类型描述符 Operations: void InitMatrix (Matrix m, int type, int n); //初始化 ElemType GetMatrixElem (Matrix m, int i, int j); //取元素 Void SetMatrixElem (Matrix m, int i, int j, ElemType v); //赋元素值 Void ClearMatrix (Matrix m); 清除特殊矩阵 end SpecialMatrix 3.2.3 特殊矩阵基本算法描述 void InitMatrix (Matrix m, int type, int s

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档