src/listmerger/utilities.cc
void
separateTwoSets(vector<Array<unsigned>*> *longLists,
                vector<Array<unsigned>*> *shortLists,
                const unsigned threshold,
                const vector<Array<unsigned>*> &originalLists,
                unsigned sortedIndex[])
{
    unsigned originalListSize = originalLists.size();

    for (unsigned i = 0; i < originalListSize; i++) {
        if (i < threshold - 1)
            longLists->push_back(originalLists.at(sortedIndex[originalListSize - i - 1]));
        else
            shortLists->push_back(originalLists.at(sortedIndex[originalListSize - i - 1]));

    }//end for

}
/*

This function is for MergeOpt algorithm
Seperate to long and short lists sets.

 */
This function is for MergeOpt algorithm
Seperate to long and short lists sets.
This function is for MergeOpt algorithm Seperate to long and short lists sets .
void
separateTwoSets(vector<Array<unsigned>*> *longLists,
                vector<Array<unsigned>*> *shortLists,
                const unsigned threshold,
                const vector<Array<unsigned>*> &originalLists,
                unsigned sortedIndex[])
{
    unsigned originalListSize = originalLists.size();
    for (unsigned i = 0; i < originalListSize; i++) {
        if (i < threshold - 1)
            longLists->push_back(originalLists.at(sortedIndex[originalListSize - i - 1]));
        else
            shortLists->push_back(originalLists.at(sortedIndex[originalListSize - i - 1]));
    }
}
void separateTwoSets ( vector < Array < unsigned > * > * longLists , vector < Array < unsigned > * > * shortLists , const unsigned threshold , const vector < Array < unsigned > * > & originalLists , unsigned sortedIndex [ ] ) { unsigned originalListSize = originalLists . size ( ) ; for ( unsigned i = 0 ; i < originalListSize ; i ++ ) { if ( i < threshold - 1 ) longLists -> push_back ( originalLists . at ( sortedIndex [ originalListSize - i - 1 ] ) ) ; else shortLists -> push_back ( originalLists . at ( sortedIndex [ originalListSize - i - 1 ] ) ) ; } }
This function is for MergeOpt algorithm
Seperate to long and short lists sets.
This function is for MergeOpt algorithm Seperate to long and short lists sets .
//end for