MArrayLogical.h

Go to the documentation of this file.
00001 //# MArrayLogical.h: Logical operations on MArray objects
00002 //# Copyright (C) 2012
00003 //# Associated Universities, Inc. Washington DC, USA.
00004 //#
00005 //# This library is free software; you can redistribute it and/or modify it
00006 //# under the terms of the GNU Library General Public License as published by
00007 //# the Free Software Foundation; either version 2 of the License, or (at your
00008 //# option) any later version.
00009 //#
00010 //# This library is distributed in the hope that it will be useful, but WITHOUT
00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00013 //# License for more details.
00014 //#
00015 //# You should have received a copy of the GNU Library General Public License
00016 //# along with this library; if not, write to the Free Software Foundation,
00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00018 //#
00019 //# Correspondence concerning AIPS++ should be addressed as follows:
00020 //#        Internet email: aips2-request@nrao.edu.
00021 //#        Postal address: AIPS++ Project Office
00022 //#                        National Radio Astronomy Observatory
00023 //#                        520 Edgemont Road
00024 //#                        Charlottesville, VA 22903-2475 USA
00025 //#
00026 //# $Id: MArrayLogical.h 21262 2012-09-07 12:38:36Z gervandiepen $
00027 
00028 #ifndef CASA_MARRAYLOGICAL_H
00029 #define CASA_MARRAYLOGICAL_H
00030 
00031 //# Includes
00032 #include <casacore/casa/aips.h>
00033 #include <casacore/tables/TaQL/MArrayMathBase.h>
00034 #include <casacore/casa/Arrays/ArrayLogical.h>
00035 #include <casacore/casa/Arrays/ArrayPartMath.h>
00036 #include <casacore/casa/BasicMath/Functors.h>
00037 
00038 namespace casacore {
00039 
00040   // <summary>
00041   // Logical operations for MArray objects.
00042   // </summary>
00043   //
00044   // <reviewed reviewer="UNKNOWN" date="" tests="tMArrayMath">
00045   //
00046   // <prerequisite>
00047   //   <li> <linkto class=MArray>MArray</linkto>
00048   // </prerequisite>
00049   //
00050   // <synopsis>
00051   // These functions perform element by element logical operations on
00052   // optionally masked arrays and/or scalars.
00053   // If two arrays are used, the arrays must conform, except for allEQ which
00054   // returns False if the arrays do not conform.
00055   //
00056   // The functions in this file can be divided in 3 groups:
00057   // <ul>
00058   //  <li> Full array operations like ==, near, etc.
00059   //       They are defined for array-array and array-scalar operations. Arrays
00060   //       shapes have to be conformant. They operate on all elements
00061   //       (also the masked ones). The result is an MArray with the same
00062   //       shape as the input array(s). It will have a mask if one of the
00063   //       operands has a mask. If both operands have a mask, the resulting
00064   //       mask is the OR of both masks.
00065   //  <li> Full reduction functions like ntrue, all, allEQ, etc.
00066   //       They operate on the unmasked elements only. If there are no unmasked
00067   //       elements, the results is 0 or True.
00068   //  <li> Reduction functions working on unmasked elements in parts of the
00069   //       input array. The result is an MArray that has a mask if the input
00070   //       array has a mask. An output element is masked off if its input
00071   //       part has no unmasked elements.
00072   //       The functors defined at the beginning of this file are used to
00073   //       operate on each part.
00074   //       There are 3 flavours:
00075   //   <ul>
00076   //    <li> partialXXX reduces one or more axes. E.g. one can count the
00077   //         number of True elements for particular array axes.
00078   //         The result is an array with a lower dimensionality.
00079   //         They can be seen as a special versions of the boxedXXX functions.
00080   //    <li> slidingXXX operates in a sliding window over the array. So the
00081   //         result is an array with the same shape as the input, although
00082   //         the output array is smaller if the edge is not filled.
00083   //    <li> boxedXXX divides the input array in boxes with the given size
00084   //         and operates on each box. The result is an array with the same
00085   //         dimensionality, but with a smaller size.
00086   //         If the box size does not fit integrally, the edge box is smaller.
00087   //   </ul>
00088   // </ul>
00089   // </synopsis>
00090   //
00091   // <group name="MArray logical operations">
00092 
00093 
00094   // Define functors to perform a reduction function on an MArray object.
00095   // <group>
00096   template<typename T, typename RES=size_t>
00097   class MNTrueFunc : public MArrayFunctorBase<T,RES> {
00098   public:
00099     virtual ~MNTrueFunc() {}
00100     RES operator() (const MArray<T>& arr) const { return ntrue(arr); }
00101   };
00102   template<typename T, typename RES=size_t>
00103   class MNFalseFunc : public MArrayFunctorBase<T,RES> {
00104   public:
00105     virtual ~MNFalseFunc() {}
00106     RES operator() (const MArray<T>& arr) const { return nfalse(arr); }
00107   };
00108   template<typename T> class MAllFunc : public MArrayFunctorBase<T,Bool> {
00109   public:
00110     virtual ~MAllFunc() {}
00111     Bool operator() (const MArray<T>& arr) const { return allTrue(arr); }
00112   };
00113   template<typename T> class MAnyFunc : public MArrayFunctorBase<T,Bool> {
00114   public:
00115     virtual ~MAnyFunc() {}
00116     Bool operator() (const MArray<T>& arr) const { return anyTrue(arr); }
00117   };
00118   // </group>
00119 
00120   // Define comparison functions between 2 MArray objects and
00121   // between MArray object and scalar.
00122   // <group>
00123   template<typename T>
00124   MArray<Bool> operator== (const MArray<T>& left, const MArray<T>& right)
00125     { return (left.isNull() || right.isNull()  ?  MArray<Bool>() :
00126               MArray<Bool> (left.array() == right.array(),
00127                             left.combineMask(right))); }
00128 
00129   template<typename T>
00130   MArray<Bool> operator<= (const MArray<T>& left, const MArray<T>& right)
00131     { return (left.isNull() || right.isNull()  ?  MArray<Bool>() :
00132               MArray<Bool> (left.array() <= right.array(),
00133                             left.combineMask(right))); }
00134 
00135   template<typename T>
00136   MArray<Bool> operator< (const MArray<T>& left, const MArray<T>& right)
00137     { return (left.isNull() || right.isNull()  ?  MArray<Bool>() :
00138               MArray<Bool> (left.array() < right.array(),
00139                             left.combineMask(right))); }
00140 
00141   template<typename T>
00142   MArray<Bool> operator>= (const MArray<T>& left, const MArray<T>& right)
00143     { return (left.isNull() || right.isNull()  ?  MArray<Bool>() :
00144               MArray<Bool> (left.array() >= right.array(),
00145                             left.combineMask(right))); }
00146 
00147   template<typename T>
00148   MArray<Bool> operator> (const MArray<T>& left, const MArray<T>& right)
00149     { return (left.isNull() || right.isNull()  ?  MArray<Bool>() :
00150               MArray<Bool> (left.array() > right.array(),
00151                             left.combineMask(right))); }
00152 
00153   template<typename T>
00154   MArray<Bool> operator!= (const MArray<T>& left, const MArray<T>& right)
00155     { return (left.isNull() || right.isNull()  ?  MArray<Bool>() :
00156               MArray<Bool> (left.array() != right.array(),
00157                             left.combineMask(right))); }
00158 
00159   template<typename T>
00160   MArray<Bool> operator|| (const MArray<T>& left, const MArray<T>& right)
00161     { return (left.isNull() || right.isNull()  ?  MArray<Bool>() :
00162               MArray<Bool> (left.array() || right.array(),
00163                             left.combineMask(right))); }
00164 
00165   template<typename T>
00166   MArray<Bool> operator&& (const MArray<T>& left, const MArray<T>& right)
00167     { return (left.isNull() || right.isNull()  ?  MArray<Bool>() :
00168               MArray<Bool> (left.array() && right.array(),
00169                             left.combineMask(right))); }
00170 
00171   template<typename T>
00172   MArray<Bool> operator== (const MArray<T>& left, const T& right)
00173     { return MArray<Bool> (left.array() == right, left); }
00174 
00175   template<typename T>
00176   MArray<Bool> operator<= (const MArray<T>& left, const T& right)
00177     { return MArray<Bool> (left.array() <= right, left); }
00178 
00179   template<typename T>
00180   MArray<Bool> operator< (const MArray<T>& left, const T& right)
00181     { return MArray<Bool> (left.array() < right, left); }
00182 
00183   template<typename T>
00184   MArray<Bool> operator>= (const MArray<T>& left, const T& right)
00185     { return MArray<Bool> (left.array() >= right, left); }
00186 
00187   template<typename T>
00188   MArray<Bool> operator> (const MArray<T>& left, const T& right)
00189     { return MArray<Bool> (left.array() > right, left); }
00190 
00191   template<typename T>
00192   MArray<Bool> operator!= (const MArray<T>& left, const T& right)
00193     { return MArray<Bool> (left.array() != right, left); }
00194 
00195   template<typename T>
00196   MArray<Bool> operator|| (const MArray<T>& left, const T& right)
00197     { return MArray<Bool> (left.array() || right, left); }
00198 
00199   template<typename T>
00200   MArray<Bool> operator&& (const MArray<T>& left, const T& right)
00201     { return MArray<Bool> (left.array() && right, left); }
00202 
00203   template<typename T>
00204   MArray<Bool> operator== (const T& left, const MArray<T>& right)
00205     { return MArray<Bool> (left == right.array(), right); }
00206 
00207   template<typename T>
00208   MArray<Bool> operator<= (const T& left, const MArray<T>& right)
00209     { return MArray<Bool> (left <= right.array(), right); }
00210 
00211   template<typename T>
00212   MArray<Bool> operator< (const T& left, const MArray<T>& right)
00213     { return MArray<Bool> (left < right.array(), right); }
00214 
00215   template<typename T>
00216   MArray<Bool> operator>= (const T& left, const MArray<T>& right)
00217     { return MArray<Bool> (left >= right.array(), right); }
00218 
00219   template<typename T>
00220   MArray<Bool> operator> (const T& left, const MArray<T>& right)
00221     { return MArray<Bool> (left > right.array(), right); }
00222 
00223   template<typename T>
00224   MArray<Bool> operator!= (const T& left, const MArray<T>& right)
00225     { return MArray<Bool> (left != right.array(), right); }
00226   // </group>
00227 
00228   // The logical OR of 2 MArray objects (normally Bool type)
00229   template<typename T>
00230   MArray<Bool> operator|| (const T& left, const MArray<T>& right)
00231     { return MArray<Bool> (left || right.array(), right); }
00232 
00233   // The logical AND of 2 MArray objects (normally Bool type).
00234   template<typename T>
00235   MArray<Bool> operator&& (const T& left, const MArray<T>& right)
00236     { return MArray<Bool> (left && right.array(), right); }
00237 
00238   // The logical NOT of an MArray object (normally Bool type).
00239   template<typename T>
00240   MArray<Bool> operator! (const MArray<T>& a)
00241     { return MArray<Bool> (!a.array(), a); }
00242 
00243 
00244   // Compare with a given relative or absolute tolerance.
00245   // <group>
00246   template<typename T>
00247   MArray<Bool> near (const MArray<T>& left, const MArray<T>& right,
00248                      Double tol)
00249     { return (left.isNull() || right.isNull()  ?  MArray<Bool>() :
00250               MArray<Bool> (near(left.array(), right.array(), tol),
00251                             left.combineMask(right))); }
00252 
00253   template<typename T>
00254   MArray<Bool> nearAbs (const MArray<T>& left, const MArray<T>& right,
00255                         Double tol)
00256     { return (left.isNull() || right.isNull()  ?  MArray<Bool>() :
00257               MArray<Bool> (nearAbs(left.array(), right.array(), tol),
00258                             left.combineMask(right))); }
00259 
00260   template<typename T>
00261   MArray<Bool> near (const MArray<T>& left, const T& right,
00262                      Double tol)
00263     { return MArray<Bool> (near(left.array(), right, tol), left); }
00264 
00265   template<typename T>
00266   MArray<Bool> nearAbs (const MArray<T>& left, const T& right,
00267                      Double tol)
00268     { return MArray<Bool> (nearAbs(left.array(), right, tol), left); }
00269 
00270   template<typename T>
00271   MArray<Bool> near (const T& left, const MArray<T>& right,
00272                      Double tol)
00273     { return MArray<Bool> (near(left, right.array(), tol), right); }
00274 
00275   template<typename T>
00276   MArray<Bool> nearAbs (const T& left, const MArray<T>& right,
00277                         Double tol)
00278     { return MArray<Bool> (nearAbs(left, right.array(), tol), right); }
00279   // </group>
00280 
00281 
00282   // Test which elements are NaN.
00283   template<typename T>
00284   MArray<Bool> isNaN (const MArray<T>& arr)
00285     { return MArray<Bool> (isNaN(arr.array()), arr); }
00286 
00287   // Test which elements are infinite.
00288   template<typename T>
00289   MArray<Bool> isInf (const MArray<T>& arr)
00290     { return MArray<Bool> (isInf(arr.array()), arr); }
00291 
00292   // Test which elements have a finite value.
00293   template<typename T>
00294   MArray<Bool> isFinite (const MArray<T>& arr)
00295     { return MArray<Bool> (isFinite(arr.array()), arr); }
00296 
00297 
00298   // Are all unmasked elements equal?
00299   // The result is True if there are no unmasked elements.
00300   // <group>
00301   template <typename T>
00302   Bool allEQ (const MArray<T>& left, const MArray<T>& right)
00303     { if (left.isNull() || right.isNull()) {
00304         return False;
00305       } else if (left.hasMask()) {
00306         if (right.hasMask()) {
00307           return compareAllMasked (left.array().begin(), left.array().end(),
00308                                    right.array.begin(), left.mask().begin(),
00309                                    right.mask().begin(), std::equal_to<T>());
00310         } else {
00311           return compareAllMasked (left.array().begin(), left.array().end(),
00312                                    right.array.begin(), left.mask().begin(),
00313                                    std::equal_to<T>());
00314         }
00315       } else if (right.hasMask()) {
00316         return compareAllMasked (left.array().begin(), left.array().end(),
00317                                  right.array.begin(), right.mask().begin(),
00318                                  std::equal_to<T>());
00319       }
00320       return allEQ (left.array(), right.array());
00321     }
00322   template <typename T>
00323   Bool allEQ (const MArray<T>& array, const T& value)
00324     { return array.isNull()  ?  False :
00325         array.hasMask() ?
00326         compareAllRightMasked (array.array().begin(), array.array().end(),
00327                                value, array.mask().begin(), std::equal_to<T>())
00328         : allEQ (array.array(), value);
00329     }
00330   template <typename T>
00331   inline Bool allEQ (const T& value, const MArray<T>& array)
00332     { return allEQ (array, value); }
00333   // </group>
00334 
00335   // Is any unmasked element equal?
00336   // The result is False if there are no unmasked elements.
00337   // <group>
00338   template <typename T>
00339   Bool anyEQ (const MArray<T>& left, const MArray<T>& right)
00340     { if (left.isNull() || right.isNull()) {
00341         return False;
00342       } else if (left.hasMask()) {
00343         if (right.hasMask()) {
00344           return compareAnyMasked (left.array().begin(), left.array().end(),
00345                                    right.array.begin(), left.mask().begin(),
00346                                    right.mask().begin(), std::equal_to<T>());
00347         } else {
00348           return compareAnyMasked (left.array().begin(), left.array().end(),
00349                                    right.array.begin(), left.mask().begin(),
00350                                    std::equal_to<T>());
00351         }
00352       } else if (right.hasMask()) {
00353         return compareAnyMasked (left.array().begin(), left.array().end(),
00354                                  right.array.begin(), right.mask().begin(),
00355                                  std::equal_to<T>());
00356       }
00357       return anyEQ (left.array(), right.array());
00358     }
00359   template <typename T>
00360   Bool anyEQ (const MArray<T>& array, const T& value)
00361     { return array.isNull()  ?  False :
00362         array.hasMask() ?
00363         compareAnyRightMasked (array.array().begin(), array.array().end(),
00364                                value, array.mask().begin(), std::equal_to<T>())
00365         : anyEQ (array.array(), value);
00366   }
00367   template <typename T>
00368   inline Bool anyEQ (const T& value, const MArray<T>& array)
00369     { return anyEQ (array, value); }
00370   // </group>
00371 
00372   // Are all unmasked elements true?
00373   inline Bool allTrue (const MArray<Bool>& array)
00374     { return allEQ (array, True); }
00375 
00376   // Is any unmasked element true?
00377   inline Bool anyTrue (const MArray<Bool>& array)
00378     { return anyEQ (array, True); }
00379 
00380   // Count the number of unmasked elements that are True.
00381   template<typename T>
00382   size_t ntrue(const MArray<T>& a)
00383   {
00384     if (a.hasMask()) {
00385       return a.array().contiguousStorage() && a.mask().contiguousStorage() ?
00386         countNEMasked<T>(a.array().cbegin(), a.array().cend(),
00387                          a.mask().cbegin(), T())  :
00388         countNEMasked<T>(a.array().begin(),  a.array().end(),
00389                          a.mask().begin(),  T());
00390     }
00391     return ntrue(a.array());
00392   }
00393 
00394   // Count the number of unmasked elements that are False.
00395   template<typename T>
00396   size_t nfalse(const MArray<T>& a)
00397   {
00398     if (a.hasMask()) {
00399       return a.array().contiguousStorage() && a.mask().contiguousStorage() ?
00400         countMasked<T>(a.array().cbegin(), a.array().cend(),
00401                        a.mask().cbegin(), T())  :
00402         countMasked<T>(a.array().begin(),  a.array().end(),
00403                        a.mask().begin(),  T());
00404     }
00405     return nfalse(a.array());
00406   }
00407 
00408 
00409   // Get partial ntrues.
00410   template<typename T>
00411   MArray<uInt> partialNTrue (const MArray<T>& a,
00412                              const IPosition& collapseAxes)
00413   {
00414     if (a.isNull()) {
00415       return MArray<uInt>();
00416     } else if (! a.hasMask()) {
00417       return MArray<uInt>(partialNTrue (a.array(), collapseAxes));
00418     }
00419     MArray<uInt> res;
00420     partialArrayMath (res, a, collapseAxes, MNTrueFunc<T,uInt>());
00421     return res;
00422   }
00423   // Get partial nfalses.
00424   template<typename T>
00425   MArray<uInt> partialNFalse (const MArray<T>& a,
00426                               const IPosition& collapseAxes)
00427   {
00428     if (a.isNull()) {
00429       return MArray<uInt>();
00430     } else if (! a.hasMask()) {
00431       return MArray<uInt>(partialNFalse (a.array(), collapseAxes));
00432     }
00433     MArray<uInt> res;
00434     partialArrayMath (res, a, collapseAxes, MNFalseFunc<T,uInt>());
00435     return res;
00436   }
00437   // Get partial all.
00438   template<typename T>
00439   MArray<Bool> partialAlls (const MArray<T>& a,
00440                             const IPosition& collapseAxes)
00441   {
00442     if (a.isNull()) {
00443       return MArray<Bool>();
00444     } else if (! a.hasMask()) {
00445       Array<Bool> res;
00446       partialArrayMath (res, a.array(), collapseAxes, AllFunc<T>());
00447       return MArray<Bool>(res);
00448     }
00449     MArray<Bool> res;
00450     partialArrayMath (res, a, collapseAxes, MAllFunc<T>());
00451     return res;
00452   }
00453   // Get partial any.
00454   template<typename T>
00455   MArray<Bool> partialAnys (const MArray<T>& a,
00456                             const IPosition& collapseAxes)
00457   {
00458     if (a.isNull()) {
00459       return MArray<Bool>();
00460     } else if (! a.hasMask()) {
00461       Array<Bool> res;
00462       partialArrayMath (res, a.array(), collapseAxes, AnyFunc<T>());
00463       return MArray<Bool>(res);
00464     }
00465     MArray<Bool> res;
00466     partialArrayMath (res, a, collapseAxes, MAnyFunc<T>());
00467     return res;
00468   }
00469 
00470   // Get sliding ntrues.
00471   template<typename T>
00472   MArray<uInt> slidingNTrue (const MArray<T>& a,
00473                              const IPosition& halfBoxSize, Bool fillEdge=True)
00474   {
00475     if (a.isNull()) {
00476       return MArray<uInt>();
00477     } else if (! a.hasMask()) {
00478       return MArray<uInt>(slidingNTrue (a.array(), halfBoxSize, fillEdge));
00479     }
00480     MArray<uInt> res;
00481     slidingArrayMath (res, a, halfBoxSize, MNTrueFunc<T,uInt>(), fillEdge);
00482     return res;
00483   }
00484   // Get sliding nfalses.
00485   template<typename T>
00486   MArray<uInt> slidingNFalse (const MArray<T>& a,
00487                               const IPosition& halfBoxSize, Bool fillEdge=True)
00488   {
00489     if (a.isNull()) {
00490       return MArray<uInt>();
00491     } else if (! a.hasMask()) {
00492       return MArray<uInt>(slidingNFalse (a.array(), halfBoxSize, fillEdge));
00493     }
00494     MArray<uInt> res;
00495     slidingArrayMath (res, a, halfBoxSize, MNFalseFunc<T,uInt>(), fillEdge);
00496     return res;
00497   }
00498   // Get sliding all.
00499   template<typename T>
00500   MArray<Bool> slidingAlls (const MArray<T>& a,
00501                             const IPosition& halfBoxSize, Bool fillEdge=True)
00502   {
00503     if (a.isNull()) {
00504       return MArray<Bool>();
00505     } else if (! a.hasMask()) {
00506       Array<Bool> res;
00507       slidingArrayMath (res, a.array(), halfBoxSize, AllFunc<T>(), fillEdge);
00508       return MArray<Bool>(res);
00509     }
00510     MArray<Bool> res;
00511     slidingArrayMath (res, a, halfBoxSize, MAllFunc<T>(), fillEdge);
00512     return res;
00513   }
00514   // Get sliding any.
00515   template<typename T>
00516   MArray<Bool> slidingAnys (const MArray<T>& a,
00517                             const IPosition& halfBoxSize, Bool fillEdge=True)
00518   {
00519     if (a.isNull()) {
00520       return MArray<Bool>();
00521     } else if (! a.hasMask()) {
00522       Array<Bool> res;
00523       slidingArrayMath (res, a.array(), halfBoxSize, AnyFunc<T>(), fillEdge);
00524       return MArray<Bool>(res);
00525     }
00526     MArray<Bool> res;
00527     slidingArrayMath (res, a, halfBoxSize, MAnyFunc<T>(), fillEdge);
00528     return res;
00529   }
00530 
00531   // Get boxed ntrues.
00532   template<typename T>
00533   MArray<uInt> boxedNTrue (const MArray<T>& a,
00534                            const IPosition& boxSize)
00535   {
00536     if (a.isNull()) {
00537       return MArray<uInt>();
00538     } else if (! a.hasMask()) {
00539       return MArray<uInt>(boxedNTrue (a.array(), boxSize));
00540     }
00541     MArray<uInt> res;
00542     boxedArrayMath (res, a, boxSize, MNTrueFunc<T,uInt>());
00543     return res;
00544   }
00545   // Get boxed nfalses.
00546   template<typename T>
00547   MArray<uInt> boxedNFalse (const MArray<T>& a,
00548                             const IPosition& boxSize)
00549   {
00550     if (a.isNull()) {
00551       return MArray<uInt>();
00552     } else if (! a.hasMask()) {
00553       return MArray<uInt>(boxedNFalse (a.array(), boxSize));
00554     }
00555     MArray<uInt> res;
00556     boxedArrayMath (res, a, boxSize, MNFalseFunc<T,uInt>());
00557     return res;
00558   }
00559   // Get boxed all.
00560   template<typename T>
00561   MArray<Bool> boxedAlls (const MArray<T>& a,
00562                           const IPosition& boxSize)
00563   {
00564     if (a.isNull()) {
00565       return MArray<Bool>();
00566     } else if (! a.hasMask()) {
00567       Array<Bool> res;
00568       boxedArrayMath (res, a.array(), boxSize, AllFunc<T>());
00569       return MArray<Bool>(res);
00570     }
00571     MArray<Bool> res;
00572     boxedArrayMath (res, a, boxSize, MAllFunc<T>());
00573     return res;
00574   }
00575   // Get boxed any.
00576   template<typename T>
00577   MArray<Bool> boxedAnys (const MArray<T>& a,
00578                           const IPosition& boxSize)
00579   {
00580     if (a.isNull()) {
00581       return MArray<Bool>();
00582     } else if (! a.hasMask()) {
00583       Array<Bool> res;
00584       boxedArrayMath (res, a.array(), boxSize, AnyFunc<T>());
00585       return MArray<Bool>(res);
00586     }
00587     MArray<Bool> res;
00588     boxedArrayMath (res, a, boxSize, MAnyFunc<T>());
00589     return res;
00590   }
00591 
00592   // </group>
00593 
00594 } //# end namespace
00595 
00596 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1