View.h

Go to the documentation of this file.
00001 /*
00002  * Expression Template Matrix Library
00003  *
00004  * Copyright (C) 2004 - 2006 Ricky Lung <mtlung@users.sourceforge.net>
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Lesser General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2.1 of the License, or (at your option) any later version.
00010  *
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Lesser General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public
00017  * License along with this library; if not, write to the Free Software
00018  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  *
00020  */
00021 
00022 
00030 #ifdef _MSC_VER
00031 #   pragma once
00032 #   pragma warning( push )
00033 #   pragma warning( disable : 4100 4127 4239 4512 4786 )
00034 #endif  // _MSC_VER
00035 
00036 #ifndef _EXMAT_VIEW_H
00037 #define _EXMAT_VIEW_H
00038 
00039 #include "../Mat.h"
00040 #include "../Expression.h"
00041 #include "../Math/Determinant.h"
00042 
00043 namespace exmat {
00044 
00045 // Common typedefs for different views
00046 #define COMMON_VIEW_TYPEDEFS()                                      \
00047 typedef typename Rep::rep_type                  super_type;         \
00048 typedef self_type                               rep_type;           \
00049 typedef super_type                              inner_rep_type;     \
00050 typedef typename super_type::row_type           row_type;           \
00051 typedef const ExpRow<self_type>                 const_row_type;     \
00052 typedef typename super_type::col_type           col_type;           \
00053 typedef typename super_type::value_type         value_type;         \
00054 typedef typename super_type::reference          reference;          \
00055 typedef typename super_type::const_reference    const_reference;    \
00056 typedef typename super_type::index_type         index_type;         \
00057 typedef typename super_type::param_type         param_type;         \
00058 typedef typename super_type::const_param_type   const_param_type;   \
00059 typedef mat_iterator<self_type>                 iterator;           \
00060 typedef const_mat_iterator<self_type>           const_iterator;     \
00061 super_type&                                     rep;                \
00062 EXMAT_INLINE2 iterator begin()                                      \
00063 {   return iterator(*this, 0, 0);   }                               \
00064 EXMAT_INLINE2 const_iterator begin() const                          \
00065 {   return const_iterator(*this, 0, 0); }                           \
00066 EXMAT_INLINE2 iterator end()                                        \
00067 {   return iterator(*this, rows(), 0);  }                           \
00068 EXMAT_INLINE2 const_iterator end() const                            \
00069 {   return const_iterator(*this, rows(), 0);    }
00070 
00071 #define COMMON_CONST_VIEW_TYPEDEFS()                                \
00072 typedef typename Rep::rep_type                  super_type;         \
00073 typedef self_type                               rep_type;           \
00074 typedef super_type                              inner_rep_type;     \
00075 typedef self_type                               const_view_type;    \
00076 typedef typename super_type::row_type           row_type;           \
00077 typedef const ExpRow<self_type>                 const_row_type;     \
00078 typedef typename super_type::col_type           col_type;           \
00079 typedef typename super_type::value_type         value_type;         \
00080 typedef typename super_type::const_reference    reference;          \
00081 typedef typename super_type::const_reference    const_reference;    \
00082 typedef typename super_type::index_type         index_type;         \
00083 typedef typename super_type::param_type         param_type;         \
00084 typedef typename super_type::const_param_type   const_param_type;   \
00085 typedef const_mat_iterator<self_type>           iterator;           \
00086 typedef const_mat_iterator<self_type>           const_iterator;     \
00087 typename OperandTypeChooser<super_type>::RET    rep;                \
00088 EXMAT_INLINE2 const_iterator begin() const                          \
00089 {   return const_iterator(*this, 0, 0); }                           \
00090 EXMAT_INLINE2 const_iterator end() const                            \
00091 {   return const_iterator(*this, rows(), 0);    }
00092 
00093 
00098 #include "Dummy.h"
00099 #include "Reverse.h"
00100 #include "Transpose.h"
00101 #include "Row.h"
00102 #include "Col.h"
00103 #include "SubVec.h"
00104 #include "SubMat.h"
00105 #include "Minor.h"
00106 #include "Cofactors.h"
00107 #include "Adjoint.h"
00108 #include "RowRemapView.h"
00110 
00111 #undef COMMON_VIEW_TYPEDEFS
00112 
00117 #include "Merge.h"
00119 
00120 }   // namespace exmat
00121 
00122 #if _MSC_VER
00123 #   pragma warning( pop )
00124 #endif  // EXMAT_VC
00125 
00126 #endif  // _EXMAT_VIEW_H

Generated on Sat May 6 23:12:03 2006 for Exmat by  doxygen 1.4.6-NO