矩阵操作函数库:创建、访问、修改、输出和读取矩阵
// 作用:返回一个m×n的矩阵,初始值为0 extern 矩阵 matriceNulle(const int m, const int n); // 作用:返回m(i,j)元素 extern T getM(const 矩阵 m, const int i, const int j); // 作用:将m(i,j)设置为x extern void setM(矩阵 *m, const int i, const int j, const T x); // 作用:交换矩阵m中的第i行和第j行 extern void echangerLignesM(矩阵 *m, const int i, const int j); // 作用:将矩阵m写入标准输出 extern void ecrireMatrice(const 矩阵 m); // 作用:从文件f中初始化矩阵m extern void lireMatrice(矩阵 *m, const char *f); // 作用:返回矩阵m的行数 extern int getNbLignes(const 矩阵 m); // 作用:返回矩阵m的列数 extern int getNbCols(const 矩阵 m);
原文地址: https://www.cveoy.top/t/topic/oSvy 著作权归作者所有。请勿转载和采集!