00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef _MATRIX_galloc2d_h_
00028 #define _MATRIX_galloc2d_h_
00029
00030
00031
00032
00033
00034
00035 template<class T>
00036 void initBasic2DArray(Basic2DArray<T>& ary, const int nr, const int nc);
00037
00038 template<class T>
00039 void resizeKeepBasic2DArray(Basic2DArray<T>& ary, const int nr, const int nc);
00040
00041 template <class T, const int D>
00042 void initBasic2DArrayHPoint(Basic2DArray<HPoint_nD<T,D> >& a, const int r,const int c) ;
00043
00044 template <class T, const int D>
00045 void resizeKeepBasic2DArrayHPoint(Basic2DArray<HPoint_nD<T,D> >& a, const int r,const int c);
00046
00047
00048
00049 template<> void initBasic2DArray(Basic2DArray<HPoint_nD<float,3> >& ary, const int nr, const int nc);
00050 template<> void initBasic2DArray(Basic2DArray<HPoint_nD<double,3> >& ary, const int nr, const int nc);
00051 template<> void initBasic2DArray(Basic2DArray<HPoint_nD<float,2> >& ary, const int nr, const int nc);
00052 template<> void initBasic2DArray(Basic2DArray<HPoint_nD<double,2> >& ary, const int nr, const int nc);
00053
00054
00055 template<> void resizeKeepBasic2DArray(Basic2DArray<HPoint_nD<float,3> >& ary, const int nr, const int nc);
00056 template<> void resizeKeepBasic2DArray(Basic2DArray<HPoint_nD<double,3> >& ary, const int nr, const int nc);
00057 template<> void resizeKeepBasic2DArray(Basic2DArray<HPoint_nD<float,2> >& ary, const int nr, const int nc);
00058 template<> void resizeKeepBasic2DArray(Basic2DArray<HPoint_nD<double,2> >& ary, const int nr, const int nc);
00059
00060
00061
00062 #ifdef HAVE_ISO_FRIEND_DECL
00063
00064 #define FRIEND_2DARRAY_ALLOCATOR \
00065 friend void initBasic2DArray<>(Basic2DArray<T>&, const int, const int); \
00066 friend void resizeKeepBasic2DArray<>(Basic2DArray<T>&, const int, const int); \
00067 friend void initBasic2DArrayHPoint<>(Basic2DArray<HPoint_nD<float,3> >&,const int,const int); \
00068 friend void initBasic2DArrayHPoint<>(Basic2DArray<HPoint_nD<double,3> >&, const int r,const int c); \
00069 friend void initBasic2DArrayHPoint<>(Basic2DArray<HPoint_nD<float,2> >&, const int r,const int c); \
00070 friend void initBasic2DArrayHPoint<>(Basic2DArray<HPoint_nD<double,2> >&, const int r,const int c); \
00071 friend void resizeKeepBasic2DArrayHPoint<>(Basic2DArray<HPoint_nD<float,3> >&,const int,const int); \
00072 friend void resizeKeepBasic2DArrayHPoint<>(Basic2DArray<HPoint_nD<double,3> >&,const int,const int); \
00073 friend void resizeKeepBasic2DArrayHPoint<>(Basic2DArray<HPoint_nD<float,2> >&, const int,const int); \
00074 friend void resizeKeepBasic2DArrayHPoint<>(Basic2DArray<HPoint_nD<double,2> >&, const int,const int); \
00075
00076 #else
00077
00078
00079
00080 template void initBasic2DArrayHPoint(Basic2DArray<HPoint_nD<float,3> >& a, const int r,const int c);
00081 template void initBasic2DArrayHPoint(Basic2DArray<HPoint_nD<double,3> >& a,const int r,const int c);
00082 template void initBasic2DArrayHPoint(Basic2DArray<HPoint_nD<float,2> >& a, const int r,const int c);
00083 template void initBasic2DArrayHPoint(Basic2DArray<HPoint_nD<double,2> >& a,const int r,const int c);
00084
00085 template void resizeKeepBasic2DArrayHPoint(Basic2DArray<HPoint_nD<float,3> >& a, const int r,const int c);
00086 template void resizeKeepBasic2DArrayHPoint(Basic2DArray<HPoint_nD<double,3> >& a, const int r,const int c);
00087 template void resizeKeepBasic2DArrayHPoint(Basic2DArray<HPoint_nD<float,2> >& a, const int r,const int c);
00088 template void resizeKeepBasic2DArrayHPoint(Basic2DArray<HPoint_nD<double,2> >& a, const int r,const int c);
00089
00090
00091
00092 #define FRIEND_2DARRAY_ALLOCATOR \
00093 friend void initBasic2DArray(Basic2DArray<T>&, const int, const int); \
00094 friend void resizeKeepBasic2DArray(Basic2DArray<T>&, const int, const int); \
00095 friend void initBasic2DArrayHPoint(Basic2DArray<HPoint_nD<float,3> >&,const int,const int); \
00096 friend void initBasic2DArrayHPoint(Basic2DArray<HPoint_nD<double,3> >&, const int r,const int c); \
00097 friend void initBasic2DArrayHPoint(Basic2DArray<HPoint_nD<float,2> >&, const int r,const int c); \
00098 friend void initBasic2DArrayHPoint(Basic2DArray<HPoint_nD<double,2> >&, const int r,const int c); \
00099 friend void resizeKeepBasic2DArrayHPoint(Basic2DArray<HPoint_nD<float,3> >&,const int,const int); \
00100 friend void resizeKeepBasic2DArrayHPoint(Basic2DArray<HPoint_nD<double,3> >&,const int,const int); \
00101 friend void resizeKeepBasic2DArrayHPoint(Basic2DArray<HPoint_nD<float,2> >&, const int,const int); \
00102 friend void resizeKeepBasic2DArrayHPoint(Basic2DArray<HPoint_nD<double,2> >&, const int,const int); \
00103
00104
00105 #endif
00106
00107
00108 #endif