123456789101112131415161718192021222324252627 |
- /**
- * @file struct_spmat.h
- * @brief 定义稀疏矩阵(sparse matrix)结构体。我们将函数原型与结构体定义拆分为两个文件,用来提高工程代码质量。
- * This is the definition of sparse matrix structure. We split function prototypes and struct definition into two files for better code engineering.
- * @version 0.1
- * @date 2021-09-17
- *
- * @copyright Copyright (c) 2021
- *
- */
- #ifndef __STRUCT_SPMAT_H__
- #define __STRUCT_SPMAT_H__
- #include "csocp_config.h"
- /** 稀疏矩阵数据结构 Data structure for sparse matrices */
- struct c_spmat_s {
- c_int nCol; /**< 列数 Number of columns */
- c_int nRow; /**< 行数 Number of rows */
- c_int nElem; /**< 非零元素数量 Number of nonzeros */
- c_int *colBeg; /**< CSC矩阵的begin指针 Begin pointer of column-wise matrix */
- c_int *colIdx; /**< CSC矩阵的index指针 Index pointer of column-wise matrix */
- c_real *colElem; /**< CSC矩阵的element指针 Element pointer of column-wise matrix */
- };
- #endif
|