Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

BpoAtan2.h

Go to the documentation of this file.
00001 #ifndef Impala_Core_Array_Trait_BpoAtan2_h
00002 #define Impala_Core_Array_Trait_BpoAtan2_h
00003 
00004 #include "Core/Array/Pattern/Categories.h"
00005 #include "Core/Array/Element/E1Cast.h"
00006 
00007 #ifdef WIN32
00008 #include <float.h>
00009 #endif
00010 #include "Util/Math.h"
00011 
00012 namespace Impala
00013 {
00014 namespace Core
00015 {
00016 namespace Array
00017 {
00018 namespace Trait
00019 {
00020 
00021 
00024 template<class DstArrayT, class Src1ArrayT, class Src2ArrayT>
00025 class BpoAtan2
00026 {
00027 public:
00029     typedef Pattern::TagTransInVar TransVarianceCategory;
00030 
00032     typedef Pattern::TagCallValue CallCategory;
00033 
00034     typedef typename DstArrayT::ArithType DstArithT;
00035     typedef typename Src1ArrayT::ArithType Src1ArithT;
00036     typedef typename Src2ArrayT::ArithType Src2ArithT;
00037 
00039     BpoAtan2()
00040     {
00041     }
00042 
00044     DstArithT
00045     DoIt(const Src1ArithT& x, const Src2ArithT& y)
00046     {
00047         Src1ArithT temp = atan2(x,y);
00048         if(IsNan(temp))
00049             temp = 0.0;
00050         return Element::E1Cast(temp, DstArithT());
00051     }
00052 };
00053 
00054 } // namespace Trait
00055 } // namespace Array
00056 } // namespace Core
00057 } // namespace Impala
00058 
00059 #endif

Generated on Fri Mar 19 09:30:54 2010 for ImpalaSrc by  doxygen 1.5.1