#ifndef _DMatrix_h #define _DMatrix_h #include #include //A simple 3x3 matrix class//////////////////////////////////////// class DMatrix { public: // ================================================================ DMatrix(int,int); //int x=0, every element of the matrix will be 0. // ================================================================ DMatrix(double **x); //input array DMatrix(double x[3][3]); //input array // ================================================================ DMatrix(DVector&, DVector&, DVector&); // input 3 vectors // ================================================================ DMatrix(const DMatrix&); // other DMatrix as input // ================================================================ ~DMatrix(); // destructor // ================================================================ DMatrix& operator=(const DMatrix&); // ================================================================ double& operator()(int,int); //================================================================ void clear(); // ================================================================ DVector operator * (DVector&); DMatrix operator * (DMatrix&); //double (*cv)[3]; double **cv; protected: void init(int,int); void getValue(double **x); void getValue(double (*x)[3]); }; #endif