src/sat/sat_iff3_finder.cpp
/**
       \brief Return true if wlist contains (l1, l2)
       It assumes wlist have been sorted using iff3_lt
    */
\brief Return true if wlist contains (l1, l2)
It assumes wlist have been sorted using iff3_lt
\ brief Return true if wlist contains ( l1 l2 ) It assumes wlist have been sorted using iff3_lt
static bool contains(watch_list const & wlist, literal l1, literal l2) {
        watched k(l1, l2);
        if (wlist.size() < SMALL_WLIST)
            return wlist.contains(k);
        iff3_lt lt;
        int low  = 0;
        int high = wlist.size(); 
        while (true) {
            int mid = low + ((high - low) / 2);
            watched const & m = wlist[mid];
            if (m == k)
                return true;
            if (lt(m, k)) {
                low = mid + 1;
            }
            else {
                SASSERT(lt(k, m));
                high = mid - 1;
            }
            if (low > high)
                return false;
        }
    }
static bool contains ( watch_list const & wlist , literal l1 , literal l2 ) { watched k ( l1 , l2 ) ; if ( wlist . size ( ) < SMALL_WLIST ) return wlist . contains ( k ) ; iff3_lt lt ; int low = 0 ; int high = wlist . size ( ) ; while ( true ) { int mid = low + ( ( high - low ) / 2 ) ; watched const & m = wlist [ mid ] ; if ( m == k ) return true ; if ( lt ( m , k ) ) { low = mid + 1 ; } else { SASSERT ( lt ( k , m ) ) ; high = mid - 1 ; } if ( low > high ) return false ; } }
\brief Return true if wlist contains (l1, l2)
It assumes wlist have been sorted using iff3_lt
\ brief Return true if wlist contains ( l1 l2 ) It assumes wlist have been sorted using iff3_lt