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

ExportMinMax.h

Go to the documentation of this file.
00001 #ifndef Impala_Core_Array_Trait_ExportMinMax_h
00002 #define Impala_Core_Array_Trait_ExportMinMax_h
00003 
00004 #include "Core/Array/Pattern/Categories.h"
00005 #include "Core/Array/Element/E0SmallVal2.h"
00006 #include "Core/Array/Element/E0LargeVal.h"
00007 
00008 namespace Impala
00009 {
00010 namespace Core
00011 {
00012 namespace Array
00013 {
00014 namespace Trait
00015 {
00016 
00017 
00018 template<class ArithT, class DataT>
00019 class ExportMinMax
00020 {
00021 public:
00022     typedef Pattern::TagPixOpOut       DirectionCategory;
00023     typedef Pattern::TagTransInVar     TransVarianceCategory;
00024     typedef Pattern::Tag1Phase         PhaseCategory;
00025 
00026     ExportMinMax()
00027     {
00028         mMinVal = Element::E0LargeVal<ArithT>(ArithT());
00029         mMaxVal = Element::E0SmallVal2<ArithT>(ArithT());
00030     }
00031 
00032     void
00033     DoIt(const ArithT& x)
00034     {
00035         mMinVal = Impala::Min(mMinVal, x);
00036         mMaxVal = Impala::Max(mMaxVal, x);
00037     }
00038 
00039 //private:
00040     ArithT mMinVal;
00041     ArithT mMaxVal;
00042 };
00043 
00044 } // namespace Trait
00045 } // namespace Array
00046 } // namespace Core
00047 } // namespace Impala
00048 
00049 #endif

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