matrix.cpp
来自「不错的国外的有限元程序代码,附带详细的manual,可以节省很多的底层工作.」· C++ 代码 · 共 26 行
CPP
26 行
// file MATRIX.CXX
#include "matrix.hxx"
#include <stdio.h>
#include <stdlib.h>
void Matrix :: checkBounds (int i,int j)
// Checks that the receiver includes a position (i,j).
{
if (i<=0) {
printf ("matrix error on rows : %d < 0 \n",i) ;
exit(0) ;}
if (j<=0) {
printf ("matrix error on columns : %d < 0 \n",j) ;
exit(0) ;}
if (i>nRows){
printf ("matrix error on rows : %d > %d \n",i,nRows) ;
exit(0) ;}
if (j>nColumns){
printf ("matrix error on columns : %d > %d \n",j,nColumns) ;
exit(0) ;}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?