spextra.c
来自「ngspice又一个电子CAD仿真软件代码.功能更全」· C语言 代码 · 共 48 行
C
48 行
/* * MATRIX UTILITY MODULE * * This file contains new routines for Spice3f * * >>> User accessible functions contained in this file: * spConstMul * * >>> Other functions contained in this file: *//* * IMPORTS * * >>> Import descriptions: * spConfig.h * Macros that customize the sparse matrix routines. * spMatrix.h * Macros and declarations to be imported by the user. * spDefs.h * Matrix type and macro definitions for the sparse matrix routines. */#define spINSIDE_SPARSE#include "spconfig.h"#include "spmatrix.h"#include "spdefs.h"voidspConstMult(matrix, constant) MatrixPtr matrix; double constant;{ ElementPtr e; int i; int size = matrix->Size; for (i = 1; i <= size; i++) { for (e = matrix->FirstInCol[i]; e; e = e->NextInCol) { e->Real *= constant; e->Imag *= constant; } }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?