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

template<class SimFunc>
void Impala::Core::Feature::RadiusClusteror< SimFunc >::Cluster ( VectorReal64  vec,
Quid  quid 
) [inline]

Definition at line 160 of file RadiusClusteror.h.

References Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::Add(), Impala::Core::Feature::RadiusClusteror< SimFunc >::CheckFeatureLen(), Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::Get2(), Impala::Core::Feature::RadiusClusteror< SimFunc >::HadEnough(), Impala::Core::Feature::RadiusClusteror< SimFunc >::mAllowOverlap, Impala::Core::Feature::RadiusClusteror< SimFunc >::mBuffer, Impala::Core::Feature::RadiusClusteror< SimFunc >::mCanProcess, Impala::Core::Feature::RadiusClusteror< SimFunc >::mClusterCount, Impala::Core::Feature::RadiusClusteror< SimFunc >::mClusterVec, Impala::Core::Feature::RadiusClusteror< SimFunc >::mNrConsidered, Impala::Core::Feature::RadiusClusteror< SimFunc >::mNrSamplesAtime, Impala::Core::Feature::RadiusClusteror< SimFunc >::mRadius, Impala::Core::Feature::RadiusClusteror< SimFunc >::mSimFunc, Impala::Core::Feature::RadiusClusteror< SimFunc >::ProcessBuffer(), Impala::Core::Table::Table::Size(), and Impala::Core::Vector::VectorTem< ElemT >::Size().

Referenced by Impala::Core::Feature::RadiusClusteror< SimFunc >::Cluster().

00161     {
00162         CheckFeatureLen(vec.Size());
00163         mNrConsidered++;
00164 
00165         // check if a new point is a candidate for a new cluster
00166         bool isCandidate = true;
00167         int i = 0;
00168         Real64 radThres = mRadius * ((mAllowOverlap) ? 1.0 : 0.5);
00169         while (isCandidate && i<mClusterVec->Size())
00170         {
00171             Real64 sim = mSimFunc.DoIt(mClusterVec->Get2(i), vec);
00172             if (sim >= radThres)
00173             {
00174                 isCandidate = false;
00175                 if (sim >= mRadius)
00176                     mClusterCount[i]++;
00177             }
00178             i++;
00179         }
00180         if (!mCanProcess || HadEnough())
00181             return;
00182 
00183         // if point is a candidate, add the point to the todo list
00184         if (isCandidate)
00185             mBuffer->Add(quid, vec);
00186 
00187         // if buffer large enough, process it
00188         while ((mBuffer->Size() > mNrSamplesAtime)
00189                && mCanProcess && (!HadEnough()))
00190         {
00191             ProcessBuffer();
00192         }
00193     }

Here is the call graph for this function:


Generated on Fri Mar 19 11:10:32 2010 for ImpalaSrc by  doxygen 1.5.1