matrix.hxx

来自「不错的国外的有限元程序代码,附带详细的manual,可以节省很多的底层工作.」· HXX 代码 · 共 44 行

HXX
44
字号
//   ********************
//   *** CLASS MATRIX ***
//   ********************
 

#ifndef matrix_hxx

class FloatMatrix ; class IntArray ;


class Matrix
/*
   This abstract class is the superclass of the class that implement
   matrices (FloatMatrix, PolynomialMatrix,...).
 DESCRIPTION :
   A matrix is characterized by its number of rows and columns.
 TASKS :
   Its tasks are defined in the subclasses.
*/
{
   protected:
      int  nRows ;
      int  nColumns ;

   public:
      Matrix ()             { }                         // constructors
      Matrix (int n,int m)  { nRows=n ; nColumns=m ;}
      ~Matrix ()            { }                         // destructor

      void          checkBounds (int,int) ;
      int           giveNumberOfRows ()      { return nRows ;}
      int           giveNumberOfColumns ()   { return nColumns ;}
      int           isSquare ()              { return (! nRows-nColumns) ;}
} ;

#define matrix_hxx
#endif






⌨️ 快捷键说明

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