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

M9poWw.h

Go to the documentation of this file.
00001 #ifndef Impala_Core_Array_Trait_M9poWw_h
00002 #define Impala_Core_Array_Trait_M9poWw_h
00003 
00004 #include "Core/Array/Pattern/Categories.h"
00005 #include "Core/Array/Element/E1Sqrt.h"
00006 
00007 namespace Impala
00008 {
00009 namespace Core
00010 {
00011 namespace Array
00012 {
00013 namespace Trait
00014 {
00015 
00016 
00019 template<class DstArrayT, class SrcArrayT>
00020 class M9poWw
00021 {
00022 public:
00024     typedef Pattern::TagTransInVar TransVarianceCategory;
00025 
00027     typedef Pattern::TagCallValue CallCategory;
00028 
00029     typedef typename DstArrayT::ArithType DstArithT;
00030     typedef typename SrcArrayT::ArithType SrcArithT;
00031 
00033     M9poWw(SrcArithT scale)
00034     {
00035         mScale = scale;
00036     }
00037 
00039     DstArithT
00040     DoIt(const SrcArithT& E, const SrcArithT& El, const SrcArithT& Ell,
00041          const SrcArithT& Ex, const SrcArithT& Elx, const SrcArithT& Ellx,
00042          const SrcArithT& Ey, const SrcArithT& Ely, const SrcArithT& Elly)
00043     {
00044         return Element::E1Sqrt(Ex*Ex + Ey*Ey + Elx*Elx + Ely*Ely + Ellx*Ellx + Elly*Elly)/
00045             (E/mScale);
00046     }
00047 
00048 private:
00049     SrcArithT mScale;
00050 };
00051 
00052 } // namespace Trait
00053 } // namespace Array
00054 } // namespace Core
00055 } // namespace Impala
00056 
00057 #endif

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