ivl 679
|
00001 /* This file is part of the ivl C++ library <http://image.ntua.gr/ivl>. 00002 A C++ template library extending syntax towards mathematical notation. 00003 00004 Copyright (C) 2012 Yannis Avrithis <iavr@image.ntua.gr> 00005 Copyright (C) 2012 Kimon Kontosis <kimonas@image.ntua.gr> 00006 00007 ivl is free software; you can redistribute it and/or modify 00008 it under the terms of the GNU Lesser General Public License 00009 version 3 as published by the Free Software Foundation. 00010 00011 Alternatively, you can redistribute it and/or modify it under the terms 00012 of the GNU General Public License version 2 as published by the Free 00013 Software Foundation. 00014 00015 ivl is distributed in the hope that it will be useful, 00016 but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00018 See the GNU General Public License for more details. 00019 00020 You should have received a copy of the GNU General Public License 00021 and a copy of the GNU Lesser General Public License along 00022 with ivl. If not, see <http://www.gnu.org/licenses/>. */ 00023 00024 #ifndef IVL_ARRAY_ND_DETAILS_ARRAY_ND_OPERATORS_HPP 00025 #define IVL_ARRAY_ND_DETAILS_ARRAY_ND_OPERATORS_HPP 00026 00027 #if 0 00028 namespace ivl { 00029 00030 template<class T1, class S1, class T2, class S2> 00031 inline 00032 array_nd<T1> operator |( 00033 const array<T1, S1>& l, const array<T1, S1>* r) 00034 { 00035 00036 } 00037 00038 template<class T1, class S1, class T2, class S2> 00039 inline 00040 array_nd<T1> operator |( 00041 const array_nd<T1, S1>& l, const array<T1, S1>* r) 00042 { 00043 00044 } 00045 00046 template<class T1, class S1, class T2, class S2> 00047 inline 00048 array_nd<T1> operator |( 00049 const array<T1, S1>& l, const array_nd<T1, S1>* r) 00050 { 00051 00052 } 00053 00054 template<class T1, class S1, class T2, class S2> 00055 inline 00056 array_nd<T1> operator |( 00057 const array_nd<T1, S1>& l, const array_nd<T1, S1>* r) 00058 { 00059 00060 } 00061 // ---------------------------------------------------------------------------- 00062 00063 00064 template<class T1, class S1, class T2, class S2> 00065 inline 00066 array_nd<T1> operator -( 00067 const array<T1, S1>& l, const array<T1, S1>* r) 00068 { 00069 00070 } 00071 00072 template<class T1, class S1, class T2, class S2> 00073 inline 00074 array_nd<T1> operator -( 00075 const array_nd<T1, S1>& l, const array<T1, S1>* r) 00076 { 00077 00078 } 00079 00080 template<class T1, class S1, class T2, class S2> 00081 inline 00082 array_nd<T1> operator -( 00083 const array<T1, S1>& l, const array_nd<T1, S1>* r) 00084 { 00085 00086 } 00087 00088 template<class T1, class S1, class T2, class S2> 00089 inline 00090 array_nd<T1> operator -( 00091 const array_nd<T1, S1>& l, const array_nd<T1, S1>* r) 00092 { 00093 00094 } 00095 00096 00097 } /* namespace ivl */ 00098 #endif 00099 // TODO: please remove this file. or not. 00100 #if 0 00101 00102 namespace ivl { 00103 00104 //-------------------------------------------------------------- 00105 // array_nd SUBSCRIPTION OPERATORS 00106 00107 template<class T, class D, class P> 00108 inline 00109 typename array_nd<T, D, P>::derived_type& array_nd<T, D, P>::operator=(const T& s) 00110 { 00111 this->assign(s); 00112 /* 00113 array<T, D, P>::operator=(s); 00114 ndim = 1; 00115 sizes = size_array(1, 1); 00116 strides = size_array(1,1); 00117 */ 00118 return derived(); 00119 } 00120 00121 template<class T, class D, class P> 00122 inline 00123 array_nd<T, D, P>& array_nd<T, D, P>::operator=(const array_nd<T, D, P>& a) 00124 { 00125 this->assign(a); 00126 /* 00127 base_class::operator=(a); 00128 00129 ndim = a.ndims(); 00130 sizes = a.size_nd(); 00131 strides = a.stride(); 00132 */ 00133 return *this; 00134 } 00135 00136 template<class T, class D, class P> 00137 template<class S, class K> 00138 inline 00139 typename array_nd<T, D, P>::derived_type& array_nd<T, D, P>::operator=(const array_nd<T, S, K>& a) 00140 { 00141 this->assign(a); 00142 /* 00143 array<T, D>::operator=(a); 00144 00145 ndim = a.ndims(); 00146 sizes = a.size_nd(); 00147 strides = a.stride(); 00148 */ 00149 return derived(); 00150 } 00151 00152 } // namespace ivl 00153 00154 #endif 00155 00156 #endif // IVL_ARRAY_ND_DETAILS_ARRAY_ND_OPERATORS_HPP