src/listmerger/utilities.cc
bool
testConsistent(const vector<unsigned> &result1,
               const vector<unsigned> &result2)
{
    if (result1.size() != result2.size())
        return false;

    UnsignedSet s1(result1.begin(), result1.end());
    UnsignedSet s2(result2.begin(), result2.end());

    UnsignedSet::iterator ite1 = s1.begin();
    UnsignedSet::iterator ite2 = s2.begin();

    while (ite1 != s1.end()) {
        if (*ite1 != *ite2)
            return false;

        ite1++;
        ite2++;

    }//end while

    return true;

}
/*
  This function is for the test of 
  consistent of two different merge
  algorithms.

  The order of results does not matter.

 */
This function is for the test of
consistent of two different merge
algorithms.

The order of results does not matter.
This function is for the test of consistent of two different merge algorithms . The order of results does not matter .
bool
testConsistent(const vector<unsigned> &result1,
               const vector<unsigned> &result2)
{
    if (result1.size() != result2.size())
        return false;
    UnsignedSet s1(result1.begin(), result1.end());
    UnsignedSet s2(result2.begin(), result2.end());
    UnsignedSet::iterator ite1 = s1.begin();
    UnsignedSet::iterator ite2 = s2.begin();
    while (ite1 != s1.end()) {
        if (*ite1 != *ite2)
            return false;
        ite1++;
        ite2++;
    }
    return true;
}
bool testConsistent ( const vector < unsigned > & result1 , const vector < unsigned > & result2 ) { if ( result1 . size ( ) != result2 . size ( ) ) return false ; UnsignedSet s1 ( result1 . begin ( ) , result1 . end ( ) ) ; UnsignedSet s2 ( result2 . begin ( ) , result2 . end ( ) ) ; UnsignedSet :: iterator ite1 = s1 . begin ( ) ; UnsignedSet :: iterator ite2 = s2 . begin ( ) ; while ( ite1 != s1 . end ( ) ) { if ( * ite1 != * ite2 ) return false ; ite1 ++ ; ite2 ++ ; } return true ; }
This function is for the test of
consistent of two different merge
algorithms.
This function is for the test of consistent of two different merge algorithms .
//end while