⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 intarray.hxx

📁 不错的国外的有限元程序代码,附带详细的manual,可以节省很多的底层工作.
💻 HXX
字号:
//   ***********************
//   *** CLASS INT ARRAY ***
//   ***********************
 

#ifndef intarray_hxx

#include "freestor.h"
#include "debug.def"
#include <stdlib.h>


class IntArray
/*
   This class implements an array of integers.
 DESCRIPTION :
   An IntArray stores its coefficients in an array 'value' of size 'size'.
 TASKS :
   - storing and reterning coefficients (method 'at') ;
   - appending another IntArray to itself ;
 REMARK :
   see Remark 2 in file "floatarry.hxx".
*/
{
   private :
      int   size ;
      int*  values ;

   public :
      IntArray (int) ;                                   // constructor
      ~IntArray ()  { if(values) freeInt(values) ;}      // destructor

#     ifdef DEBUG
	 int&    at (int) ;
#     else
	 int&    at (int i)                  { return values[i-1] ;}
#     endif
      void       checkBounds (int) ;
      IntArray*  followedBy (IntArray*) ;
      int        giveSize ()                 { return size ;}
      int        isEmpty ()                  { return size==0 ;}
      void       printYourself () ;
} ;

#define intarray_hxx
#endif


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -