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

template<class ElemT>
Real64 Impala::Core::Vector::WeibullSim ( const VectorTem< ElemT > &  v1,
const VectorTem< ElemT > &  v2 
) [inline]

Compute similarity assuming vectors contain only beta and gamma.

Definition at line 31 of file WeibullSim.h.

References Impala::Core::Vector::VectorTem< ElemT >::Size().

00032 {
00033     Real64 score = 0;
00034     for (int i=0 ; i<v1.Size() ; i+=2)
00035     {
00036         //score += WeibullSim((Real64) v1[i], (Real64) v1[i+1],
00037         //                    (Real64) v2[i], (Real64) v2[i+1]);
00038         // This seems to be about 10% faster on windows...
00039         Real64 b1 = v1[i];
00040         Real64 g1 = v1[i+1];
00041         Real64 b2 = v2[i];
00042         Real64 g2 = v2[i+1];
00043         if (g1!=0 && g2!=0 && b1!=0 && b2!=0)
00044         {
00045             Real64 g = (g1>g2 ? g2/g1 : g1/g2);
00046             Real64 b = (b1>b2 ? b2/b1 : b1/b2);
00047             score += g*b;
00048         }
00049     }
00050     return score / (v1.Size() / 2);
00051 }

Here is the call graph for this function:


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