正在加载图片...
521假设稀疏矩阵A和B均以三元组顺序表作为存储结构:求 C=A+B。 (1)定义类型: +define MAXSIze 100 typedef struct t int i,j;//非零元行、列下标 ElemType e } Triple;//定义三元组 typedef struct Triple dataLMAXSIzE+1 int mu, nu, tu. } SMAtrix;//定义三元组表(1) 定义类型: #define MAXSIZE 100 typedef struct { int i,j;//非零元行、列下标 ElemType e; } Triple; //定义三元组 typedef struct { Triple data[MAXSIZE+1]; int mu,nu,tu; } TSMatrix; //定义三元组表 5.21 假设稀疏矩阵A和B均以三元组顺序表作为存储结构:求 C=A+B
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有