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

double Impala::Core::Matrix::my_vec_distance ( double *  v1,
double *  v2,
int  nElem,
double  currentMin 
) [inline]

Definition at line 27 of file MatKMeans.h.

00028 {
00029     if (currentMin>0)
00030     {
00031         double currentMinSquared = currentMin*currentMin;
00032         double s=0,tmp ;
00033         int i=0 ;
00034         while (s<currentMinSquared && i<nElem)
00035         {
00036                 s += (tmp = v1[i] - v2[i],tmp*tmp);
00037                 i++;
00038         }
00039         return i==nElem?sqrt(s):currentMin;
00040     }
00041     return currentMin;  
00042 }


Generated on Thu Jan 13 09:20:12 2011 for ImpalaSrc by  doxygen 1.5.1