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

template<class ArrayT>
void Impala::Core::Vector::Max ( typename VectorSet< ArrayT >::VectorT *  dst,
VectorSet< ArrayT > *  src,
int  startIdx,
int  stepSize,
int  nrSteps 
) [inline]

Definition at line 17 of file Max.h.

References Impala::Core::Vector::VectorSet< ArrayT >::GetVector(), Impala::Core::Vector::VectorSet< ArrayT >::GetVectorLength(), Impala::Core::Vector::VectorSet< ArrayT >::HasConstVectorSize(), and MaxAssign().

Referenced by Similarity().

00019 {
00020     typedef typename VectorSet<ArrayT>::VectorT VectorT;
00021 
00022     if (!src->HasConstVectorSize())
00023     {
00024         std::cout << "Vector::Max: works for constant vector size only" << std::endl;
00025         return;
00026     }
00027     VectorT res(src->GetVectorLength(0));
00028     res = 0;
00029     int endIdx = startIdx + nrSteps * stepSize;
00030     for (int i=startIdx ; i<endIdx ; i+=stepSize)
00031         MaxAssign(res, src->GetVector(i, true));
00032     if (!dst)
00033         dst = new VectorT(res);
00034     else
00035         *dst = res;
00036 }

Here is the call graph for this function:


Generated on Thu Jan 13 09:21:36 2011 for ImpalaSrc by  doxygen 1.5.1