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
00028 #ifndef TABLES_TABVECLOGIC_H
00029 #define TABLES_TABVECLOGIC_H
00030
00031
00032 #include <casacore/casa/aips.h>
00033 #include <casacore/tables/Tables/TableVector.h>
00034 #include <casacore/tables/Tables/TVecLogic.h>
00035
00036
00037 namespace casacore {
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058 template<class T> inline
00059 Bool allLE (const TableVector<T>& left, const TableVector<T>& right);
00060 template<class T> inline
00061 Bool allLT (const TableVector<T>& left, const TableVector<T>& right);
00062 template<class T> inline
00063 Bool allGE (const TableVector<T>& left, const TableVector<T>& right);
00064 template<class T> inline
00065 Bool allGT (const TableVector<T>& left, const TableVector<T>& right);
00066 template<class T> inline
00067 Bool allEQ (const TableVector<T>& left, const TableVector<T>& right);
00068 template<class T> inline
00069 Bool allNE (const TableVector<T>& left, const TableVector<T>& right);
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092 template<class T> inline
00093 Bool allLE (const TableVector<T>& left, const T& right);
00094 template<class T> inline
00095 Bool allLE (const T& left, const TableVector<T>& right);
00096 template<class T> inline
00097 Bool allLT (const TableVector<T>& left, const T& right);
00098 template<class T> inline
00099 Bool allLT (const T& left, const TableVector<T>& right);
00100 template<class T> inline
00101 Bool allGE (const TableVector<T>& left, const T& right);
00102 template<class T> inline
00103 Bool allGE (const T& left, const TableVector<T>& right);
00104 template<class T> inline
00105 Bool allGT (const TableVector<T>& left, const T& right);
00106 template<class T> inline
00107 Bool allGT (const T& left, const TableVector<T>& right);
00108 template<class T> inline
00109 Bool allEQ (const TableVector<T>& left, const T& right);
00110 template<class T> inline
00111 Bool allEQ (const T& left, const TableVector<T>& right);
00112 template<class T> inline
00113 Bool allNE (const TableVector<T>& left, const T& right);
00114 template<class T> inline
00115 Bool allNE (const T& left, const TableVector<T>& right);
00116
00117
00118
00119
00120
00121
00122 #define TABVECLOGICOPER(NAME) \
00123 template<class T> inline \
00124 Bool aips_name2(all,NAME) (const TableVector<T>& l, \
00125 const TableVector<T>& r) \
00126 { return aips_name2(tabVecReptv,NAME) (l.tabVec(), r.tabVec()); } \
00127 template<class T> inline \
00128 Bool aips_name2(all,NAME) (const T& val, const TableVector<T>& tv) \
00129 { return aips_name2(tabVecRepvall,NAME) (val, tv.tabVec()); } \
00130 template<class T> inline \
00131 Bool aips_name2(all,NAME) (const TableVector<T>& tv, const T& val) \
00132 { return aips_name2(tabVecRepvalr,NAME) (tv.tabVec(), val); }
00133
00134 TABVECLOGICOPER(LE)
00135 TABVECLOGICOPER(LT)
00136 TABVECLOGICOPER(GE)
00137 TABVECLOGICOPER(GT)
00138 TABVECLOGICOPER(EQ)
00139 TABVECLOGICOPER(NE)
00140
00141
00142
00143
00144
00145
00146
00147 template<class T> inline
00148 Bool anyLE (const TableVector<T>& l, const TableVector<T>& r)
00149 {
00150 return (allGT (l, r) ? False : True);
00151 }
00152 template<class T> inline
00153 Bool anyLT (const TableVector<T>& l, const TableVector<T>& r)
00154 {
00155 return (allGE (l, r) ? False : True);
00156 }
00157 template<class T> inline
00158 Bool anyGE (const TableVector<T>& l, const TableVector<T>& r)
00159 {
00160 return (allLT (l, r) ? False : True);
00161 }
00162 template<class T> inline
00163 Bool anyGT (const TableVector<T>& l, const TableVector<T>& r)
00164 {
00165 return (allLE (l, r) ? False : True);
00166 }
00167 template<class T> inline
00168 Bool anyEQ (const TableVector<T>& l, const TableVector<T>& r)
00169 {
00170 return (allNE (l, r) ? False : True);
00171 }
00172 template<class T> inline
00173 Bool anyNE (const TableVector<T>& l, const TableVector<T>& r)
00174 {
00175 return (allEQ (l, r) ? False : True);
00176 }
00177
00178
00179
00180
00181
00182
00183
00184
00185 template<class T> inline
00186 Bool anyLE (const TableVector<T>& tv, const T &val)
00187 {
00188 return (allGT (tv, val) ? False : True);
00189 }
00190 template<class T> inline
00191 Bool anyLE (const T &val, const TableVector<T>& tv)
00192 {
00193 return (allGT (val, tv) ? False : True);
00194 }
00195 template<class T> inline
00196 Bool anyLT (const TableVector<T>& tv, const T &val)
00197 {
00198 return (allGE (tv, val) ? False : True);
00199 }
00200 template<class T> inline
00201 Bool anyLT (const T &val, const TableVector<T>& tv)
00202 {
00203 return (allGE (val, tv) ? False : True);
00204 }
00205 template<class T> inline
00206 Bool anyGE (const TableVector<T>& tv, const T &val)
00207 {
00208 return (allLT (tv, val) ? False : True);
00209 }
00210 template<class T> inline
00211 Bool anyGE (const T &val, const TableVector<T>& tv)
00212 {
00213 return (allLT (val, tv) ? False : True);
00214 }
00215 template<class T> inline
00216 Bool anyGT (const TableVector<T>& tv, const T &val)
00217 {
00218 return (allLE (tv, val) ? False : True);
00219 }
00220 template<class T> inline
00221 Bool anyGT (const T &val, const TableVector<T>& tv)
00222 {
00223 return (allLE (val, tv) ? False : True);
00224 }
00225 template<class T> inline
00226 Bool anyEQ (const TableVector<T>& tv, const T &val)
00227 {
00228 return (allNE (tv, val) ? False : True);
00229 }
00230 template<class T> inline
00231 Bool anyEQ (const T &val, const TableVector<T>& tv)
00232 {
00233 return (allNE (val, tv) ? False : True);
00234 }
00235 template<class T> inline
00236 Bool anyNE (const TableVector<T>& tv, const T &val)
00237 {
00238 return (allEQ (tv, val) ? False : True);
00239 }
00240 template<class T> inline
00241 Bool anyNE (const T &val, const TableVector<T>& tv)
00242 {
00243 return (allEQ (val, tv) ? False : True);
00244 }
00245
00246
00247
00248 }
00249
00250 #ifndef CASACORE_NO_AUTO_TEMPLATES
00251 #include <casacore/tables/Tables/TabVecLogic.tcc>
00252 #endif //# CASACORE_NO_AUTO_TEMPLATES
00253 #endif