00001 /* 00002 * $Id: mat.h,v 1.2 2003/09/15 17:15:31 jmk Exp $ 00003 */ 00004 /////////////////////////////////////////////////////////////////////////// 00005 // _____________ ______________________ __ __ _____ 00006 // / ________ | | ___ ________ / | \ / \ | 00007 // | | | |_ | |_ | | / / \__ | | 00008 // | | ___ | || | || | | / / | | | 00009 // | | | \ | || | || | | / / \__/ \__/ __|__ 00010 // | | |_@ || || | || | | / / Institute 00011 // | |___/ || ||_| || | | / /_____________________ 00012 // \_______/ \______/ | |__| /___________________________ 00013 // | |__| | 00014 // \______/ 00015 // University of Utah 00016 // 2002 00017 /////////////////////////////////////////////////////////////////////////// 00018 00019 // mat.h 00020 // a generic matrix, column major order ( mat[y][x] ) 00021 00022 #ifndef __GUTZ_MATRIX_DOT_H 00023 #define __GUTZ_MATRIX_DOT_H 00024 00025 #include "vec.h" 00026 00027 namespace gutz { 00028 00029 template<class T, int X_DIM, int Y_DIM = X_DIM> 00030 class mat { 00031 public: 00032 00033 enum THE_DIM { 00034 DIM = M_DIM 00035 }; 00036 00037 /// return vec Alloc Policy for column access 00038 typedef WrapAllocPolicy<T> ColAP; 00039 /// return vec Alloc Policy for row access 00040 typedef OwnAllocPolicy<T> RowAP; 00041 00042 mat(); 00043 mat(const mat &mtx); 00044 virtual ~mat() { if(m) delete[] m; } 00045 00046 /// public data 00047 T *m; 00048 00049 }; 00050 00051 }/// end namespace gutz 00052 00053 #endif 00054