SparseMatrixSummation

所属分类:数据结构
开发工具:C/C++
文件大小:19KB
下载次数:3
上传日期:2007-12-22 13:54:43
上 传 者aandt
说明:  数据结构 1、算法思路: 先定义一个三元组,创建稀疏矩阵m和n。依次扫描A和B的行号和列号,若A的当前项的行号等于B的当前项的行号,则比较其列号,将较小列的项存入C中,如果列号也相等,则将对应的元素值相加后存入C中;若A的当前项的行号小于B的当前项的行号,则将A的项存入C中;若A的当前项的行号大于B的当前项的行号,则将B的项存入C中。
(Data Structures 1, algorithm ideas: first define a triple to create sparse matrix m and n. A and B followed by scanning line number and column number, if the A s current line number of the equivalent B of the current line number, then set out to compare their number, will be heading out into the smaller C, if the column has also equal to the corresponding elements will add value in deposit C if A current of the line number is less than B s current line-item number, the item will be A deposit of C if A current items Bank B is greater than its current line-item number, the item will be deposited in B in C.)

文件列表:
实验3 稀疏矩阵求和.doc (50176, 2007-12-22)

近期下载者

相关文件


收藏者