📄 smpaddelt.c
字号:
/* * Copyright (c) 1985 Thomas L. Quarles */ /* * SMPaddElt.c (matrix, row, col, value) * - add an element to the Sparse Matrix Package * structure. matrix is a SMPmatrix pointer, * row and column are row and column numbers, and * value is the value to be added to the given * location. value must be of type double * and row and column must be integers, which will * be mapped as necessary to ensure a compact numbering * set. */#include "prefix.h"#include "util.h"#include "SMPdefs.h"#include <stdio.h>#include "SPerror.h"#include "suffix.h"RCSID("SMPaddElt.c $Revision: 1.1 $ on $Date: 91/04/02 11:48:16 $")intSMPaddElt(matrix, row, col, value) SMPmatrix * matrix; int row; int col; double value;{ register double *temp; temp = (SMPmakeElt(matrix,row,col)) ; if(temp) { *temp += value; return(0); } return(E_NOMEM);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -