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

UpoThreshold.h

Go to the documentation of this file.
00001 #ifndef Impala_Core_Array_Trait_UpoThreshold_h
00002 #define Impala_Core_Array_Trait_UpoThreshold_h
00003 
00004 #include "Core/Array/Pattern/Categories.h"
00005 
00006 namespace Impala
00007 {
00008 namespace Core
00009 {
00010 namespace Array
00011 {
00012 namespace Trait
00013 {
00014 
00015 
00016 template<class DstArrayT, class SrcArrayT>
00017 class UpoThreshold
00018 {
00019 public:
00021     typedef Pattern::TagTransInVar TransVarianceCategory;
00022 
00024     typedef Pattern::TagCallValue CallCategory;
00025 
00026     typedef typename DstArrayT::ArithType DstArithT;
00027     typedef typename SrcArrayT::ArithType SrcArithT;
00028 
00029     UpoThreshold(SrcArithT level)
00030     {
00031         mLevel = level;
00032     }
00033 
00034     DstArithT
00035     DoIt(const SrcArithT& x)
00036     {
00037         return x >= mLevel ? Int32(1) : Int32(0);
00038     }
00039 
00040 private:
00041     SrcArithT         mLevel;
00042 };
00043 
00044 } // namespace Trait
00045 } // namespace Array
00046 } // namespace Core
00047 } // namespace Impala
00048 
00049 #endif
00050 

Generated on Fri Mar 19 09:31:03 2010 for ImpalaSrc by  doxygen 1.5.1