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

void @44::GetNSamples ( Feature::AnnotatedFeatureTable featureSampling,
Feature::PointDescriptorTable pointData,
int  n,
int  classId 
) [static]

Definition at line 66 of file mainRandomForest.cpp.

References Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::Add(), Impala::Core::Feature::PointDescriptorTable::GetDescriptorData(), Impala::Core::Feature::PointDescriptorTable::GetDescriptorLength(), Impala::Util::Random::RandomUniqueNumbers(), and Impala::Core::Table::Table::Size().

Referenced by GetFeatures().

00068 {
00069     static Util::Random sRNG;
00070     std::set<int> indices = sRNG.RandomUniqueNumbers(n, pointData->Size());
00071     for(std::set<int>::iterator itIndex = indices.begin() ;
00072         itIndex != indices.end() ; ++itIndex)
00073     {
00074         int index = *itIndex;
00075         Vector::VectorTem<double> vector(pointData->GetDescriptorLength(), 
00076             pointData->GetDescriptorData(index), true);
00077         featureSampling.Add(vector, classId);
00078     }
00079 }

Here is the call graph for this function:


Generated on Thu Jan 13 09:05:38 2011 for ImpalaSrc by  doxygen 1.5.1