returns the index in the filter of the 'n'th positive element or 'size' if there are less than 'n' positive elements. So if we use a filter with a table then table->Get1(IndexOfNth(filter, table->Size(), 3)) will return the 3rd selected value. Although of course that fails when the selection has less than 3 elements. Definition at line 64 of file FilterOperations.h. Referenced by Impala::Core::Feature::TryRandomSplit(). 00065 { 00066 int count=0; 00067 for(int i=0 ; i<size ; ++i) 00068 if(set[i]) 00069 { 00070 if(count==n) 00071 return i; 00072 ++count; 00073 } 00074 return size; 00075 }
|