00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef SELDON_FILE_MATRIX_BASE_HXX
00023
00024 #include "../Common/Common.hxx"
00025 #include "../Common/Properties.hxx"
00026 #include "../Common/Storage.hxx"
00027 #include "../Common/Errors.cxx"
00028 #include "../Common/Allocator.hxx"
00029
00030 namespace Seldon
00031 {
00032
00033
00035
00039 template <class T, class Allocator = SELDON_DEFAULT_ALLOCATOR<T> >
00040 class Matrix_Base
00041 {
00042
00043 public:
00044 typedef typename Allocator::value_type value_type;
00045 typedef typename Allocator::pointer pointer;
00046 typedef typename Allocator::const_pointer const_pointer;
00047 typedef typename Allocator::reference reference;
00048 typedef typename Allocator::const_reference const_reference;
00049
00050
00051 protected:
00052 static Allocator allocator_;
00053
00054
00055 protected:
00056
00057 int m_;
00058
00059 int n_;
00060
00061 pointer data_;
00062
00063
00064 public:
00065
00066 Matrix_Base();
00067 Matrix_Base(int i);
00068 Matrix_Base(int i, int j);
00069
00070
00071 ~Matrix_Base();
00072
00073
00074 int GetM() const;
00075 int GetN() const;
00076 int GetSize() const;
00077 pointer GetData() const;
00078 const_pointer GetDataConst() const;
00079 void* GetDataVoid() const;
00080 const void* GetDataConstVoid() const;
00081
00082 };
00083
00084
00085
00086 template <class T, class Allocator>
00087 Allocator Matrix_Base<T, Allocator>::allocator_;
00088
00089
00090 template <class T, class Prop, class Storage, class Allocator>
00091 ostream& operator << (ostream& out,
00092 const Matrix<T, Prop, Storage, Allocator>& A);
00093
00094
00095 }
00096
00097 #define SELDON_FILE_MATRIX_BASE_HXX
00098 #endif