矩阵相加,看不懂,求注释typedef int ElemType;class Triple{public:\x05int row;\x05int col;\x05ElemType e;\x05\x05Triple(){}\x05virtual Triple(){}\x05BOOL operator

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/03 10:03:07
矩阵相加,看不懂,求注释typedef int ElemType;class Triple{public:\x05int row;\x05int col;\x05ElemType e;\x05\x05Triple(){}\x05virtual Triple(){}\x05BOOL operator

矩阵相加,看不懂,求注释typedef int ElemType;class Triple{public:\x05int row;\x05int col;\x05ElemType e;\x05\x05Triple(){}\x05virtual Triple(){}\x05BOOL operator
矩阵相加,看不懂,求注释
typedef int ElemType;
class Triple{
public:
\x05int row;
\x05int col;
\x05ElemType e;
\x05
\x05Triple(){}
\x05virtual Triple(){}
\x05BOOL operator

矩阵相加,看不懂,求注释typedef int ElemType;class Triple{public:\x05int row;\x05int col;\x05ElemType e;\x05\x05Triple(){}\x05virtual Triple(){}\x05BOOL operator
这个是稀疏矩阵的加法,你得先了解稀疏矩阵的存储方法,即我们不但要保存每个非零元素的值,而且要保存其下标,因此在相加时还需判断两矩阵的非零元素下标是否相等才可相加.