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

InOutSetRandom.h

Go to the documentation of this file.
00001 #ifndef Impala_Core_Array_Trait_InOutSetRandom_h
00002 #define Impala_Core_Array_Trait_InOutSetRandom_h
00003 
00004 #include "Core/Array/Pattern/Categories.h"
00005 #include "Util/Random.h"
00006 
00007 namespace Impala
00008 {
00009 namespace Core
00010 {
00011 namespace Array
00012 {
00013 namespace Trait
00014 {
00015 
00017 template<class ArrayT>
00018 class InOutSetRandom
00019 {
00020 public:
00021     typedef Pattern::TagPixOpIn        DirectionCategory;
00022     typedef Pattern::TagTransInVar     TransVarianceCategory;
00023     typedef Pattern::Tag1Phase         PhaseCategory;
00024 
00025     typedef typename ArrayT::ArithType ArithT;
00026 
00027     InOutSetRandom(ArithT maxVal)
00028     {
00029         mMaxValue = maxVal;
00030     }
00031 
00035     ArithT
00036     DoIt()
00037     {
00038         return Util::RandomDouble(mMaxValue);
00039     }
00040 
00041 private:
00042 
00043     ArithT mMaxValue;
00044 };
00045 
00046 } // namespace Trait
00047 } // namespace Array
00048 } // namespace Core
00049 } // namespace Impala
00050 
00051 #endif

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