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

ElemMax.h

Go to the documentation of this file.
00001 #ifndef Impala_Core_Vector_ElemMax_h
00002 #define Impala_Core_Vector_ElemMax_h
00003 
00004 #include "Core/Vector/VectorTem.h"
00005 
00006 namespace Impala
00007 {
00008 namespace Core
00009 {
00010 namespace Vector
00011 {
00012 
00013 
00014 template <class ElemT>
00015 inline ElemT
00016 ElemMax(VectorTem<ElemT> v)
00017 {
00018     ElemT* p = v.GetData();
00019     ElemT res = p[0];
00020     for (int i=1 ; i<v.Size() ; i++)
00021         if (p[i] > res)
00022             res = p[i];
00023     return res;
00024 }
00025 
00026 } // namespace Vector
00027 } // namespace Core
00028 } // namespace Impala
00029 
00030 #endif

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