Matrix3D.h
Go to the documentation of this file.00001 #pragma once
00002
00003
00010
00011 template <class TMatrix2D >
00012 class Matrix3D
00013 {
00014 private:
00015
00020 unsigned int rows_m;
00021 unsigned int cols_m;
00022
00023 const typename TMatrix2D::RingType * ring_m;
00024
00025 string name_m;
00026
00027 vector< TMatrix2D *> matrix2DList_m;
00028
00030 public:
00031
00032 typedef TMatrix2D Matrix2D_Type;
00033
00036 Matrix3D(unsigned int rows, unsigned int cols, unsigned int depth, const typename TMatrix2D::RingType* ring, string name="" );
00037
00038 Matrix3D(unsigned int rows,unsigned int cols, const vector< TMatrix2D *> & matlist, const typename TMatrix2D::RingType* ring= NULL, string name="" );
00039
00046 unsigned int getRowNum() const ;
00047 unsigned int getColNum() const ;
00048
00050 unsigned int getZNum() const ;
00051
00052 const typename TMatrix2D::RingType* getRing() const;
00053
00054 void setName(string name ) ;
00055 std::string getName(string name ) const ;
00061 void setVal(unsigned int row,unsigned int col,unsigned int z, typename TMatrix2D::ElementType val) ;
00062
00063 typename TMatrix2D::ElementType getVal(unsigned int row,unsigned int col,unsigned int z) const;
00064
00066 void setFrontalMatrix(unsigned int index, TMatrix2D * matrix);
00067 void appendFrontalMatrix( TMatrix2D * matrix);
00068
00069
00070 TMatrix2D & getFrontalMatrixRef( unsigned int index);
00071 const TMatrix2D & getFrontalMatrixConstRef( unsigned int index) const;
00072
00078
00079 Matrix3D* leftMultiply(const TMatrix2D * mat) const;
00080
00082 Matrix3D* rightMultiply(const TMatrix2D * mat) const;
00083
00085 Matrix3D* getTransversalForm() const;
00086
00087 inline Matrix3D * computeFrontalMatrixBasis( ) const;
00088
00089 void clear();
00090
00097 void printTransversalView() const;
00098
00099 void print3DMatrix(ostream & os) const;
00100
00101 void print3DMatrix() const;
00102
00107 ~Matrix3D();
00108
00109 private:
00112 void checkDimensions(unsigned int row, unsigned int col, unsigned int depth) const;
00113
00116 };
00117
00118 #include "Matrix3D.hpp"