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

ConvolutionTraits.h

Go to the documentation of this file.
00001 #ifndef Impala_Core_Tracking_TraitBpoAddAssignPtr_h
00002 #define Impala_Core_Tracking_TraitBpoAddAssignPtr_h
00003 
00004 #include "Core/Array/Element/E0SmallVal2.h"
00005 #include "Core/Array/Pattern/Categories.h"
00006 
00007 namespace Impala
00008 {
00009 namespace Core
00010 {
00011 namespace Tracking
00012 {
00013 
00016 class TraitBpoAddAssignPtr
00017 {
00018 public:
00019     typedef Impala::Core::Array::Pattern::TagTransInVar TransVarianceCategory;
00020     typedef Impala::Core::Array::Pattern::TagCallPointer CallCategory;
00021 
00022         TraitBpoAddAssignPtr()
00023         {
00024         }
00025 
00027     void DoIt(double* x, double* y)
00028         {
00029         for(int i=0 ; i<1 ; i++)
00030             x[i] += y[i];
00031         }
00032 
00033     static void NeutralElement(double* x)
00034         {
00035         for(int i=0 ; i<1 ; i++)
00036             x[i] += 0;
00037         }
00038 };
00039 
00042 class TraitBpoDist
00043 {
00044 public:
00045     typedef Impala::Core::Array::Pattern::TagTransInVar TransVarianceCategory;
00046     typedef Impala::Core::Array::Pattern::TagCallPointer CallCategory;
00047 
00048 
00049     TraitBpoDist() {}
00050 
00051     void
00052         DoIt(double* res, double* p1, double* p2)
00053         {
00054         int i;
00055         double t;
00056         *res=0;
00057         for(i=0 ; i<3 ; i++)
00058         {
00059             t = p1[i] - p2[i];
00060             *res += t*t;
00061         }
00062         }
00063 };
00064 
00067 class TraitBpoInproduct
00068 {
00069 public:
00070     typedef Impala::Core::Array::Pattern::TagTransInVar TransVarianceCategory;
00071     typedef Impala::Core::Array::Pattern::TagCallPointer CallCategory;
00072 
00073 
00074     TraitBpoInproduct() {}
00075 
00076     void
00077     DoIt(double* res, double* p1, double* p2)
00078     {
00079         int i;
00080         *res=0;
00081         for(i=0 ; i<3 ; i++)
00082         {
00083             *res += p1[i] * p2[i];
00084         }
00085     }
00086 };
00087 
00088 } // namespace Tracking
00089 } // namespace Core
00090 } // namespace Impala
00091 
00092 #endif //Impala_Core_Tracking_TraitBpoAddAssignPtr_h

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