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

NormalizationMax.h

Go to the documentation of this file.
00001 #ifndef Impala_Core_Vector_NormalizationMax_h
00002 #define Impala_Core_Vector_NormalizationMax_h
00003 
00004 #include "Core/Vector/VectorSet.h"
00005 #include "Core/Vector/MaxAssign.h"
00006 #include "Core/Vector/DivAssign.h"
00007 
00008 namespace Impala
00009 {
00010 namespace Core
00011 {
00012 namespace Vector
00013 {
00014 
00015 
00018 template <class ArrayT>
00019 inline void
00020 NormalizationMax(VectorSet<ArrayT>* vs)
00021 {
00022     typedef typename VectorSet<ArrayT>::VectorT VectorT;
00023     VectorT maxV = vs->GetVector(0, false);
00024     for (int i=1 ; i<vs->Size() ; i++)
00025         MaxAssign(maxV, vs->GetVector(i, true));
00026     for (int i=0 ; i<vs->Size() ; i++)
00027     {
00028         VectorT v = vs->GetVector(i, true);
00029         DivAssign(v, maxV);
00030     }
00031 }
00032 
00033 } // namespace Vector
00034 } // namespace Core
00035 } // namespace Impala
00036 
00037 #endif

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