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

M9N4poConFeat.h

Go to the documentation of this file.
00001 #ifndef Impala_Core_Array_Trait_M9N4poConFeat_h
00002 #define Impala_Core_Array_Trait_M9N4poConFeat_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 
00020 template<class DstArrayT, class SrcArrayT>
00021 class M9N4poConFeat
00022 {
00023 public:
00025     typedef Pattern::TagTransInVar TransVarianceCategory;
00026 
00028     typedef Pattern::TagCallValue CallCategory;
00029 
00030     typedef typename DstArrayT::StorType DstStorT;
00031     typedef typename DstArrayT::ArithType DstArithT;
00032     typedef typename SrcArrayT::ArithType SrcArithT;
00033 
00035     M9N4poConFeat(SrcArithT scale)
00036     {
00037         mScale = scale;
00038     }
00039 
00041     void
00042     DoIt(DstStorT* Cl, DstStorT* Cll, DstStorT* Clw, DstStorT* Cllw,
00043          const SrcArithT& E, const SrcArithT& Ex, const SrcArithT& Ey,
00044          const SrcArithT& El, const SrcArithT& Elx, const SrcArithT& Ely,
00045          const SrcArithT& Ell, const SrcArithT& Ellx, const SrcArithT& Elly)
00046     {
00047         *Cl = El / E;
00048         *Cll = Ell / E;
00049         SrcArithT tmpx = Elx*E - El*Ex;
00050         SrcArithT tmpy = Ely*E - El*Ey;
00051         *Clw = ( Element::E1Sqrt(tmpx*tmpx + tmpy*tmpy) / (E*E) ) * mScale;
00052         tmpx = Ellx*E - Ell*Ex;
00053         tmpy = Elly*E - Ell*Ey;
00054         *Cllw = ( Element::E1Sqrt(tmpx*tmpx + tmpy*tmpy) / (E*E) ) * mScale;
00055     }
00056 
00057     SrcArithT mScale;
00058 };
00059 
00060 } // namespace Trait
00061 } // namespace Array
00062 } // namespace Core
00063 } // namespace Impala
00064 
00065 #endif

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