src/smt/theory_jobscheduler.cpp
/**
     * \brief check that job properties is a subset of resource properties.
     * It assumes that both vectors are sorted.
     */
\brief check that job properties is a subset of resource properties.
It assumes that both vectors are sorted.
\ brief check that job properties is a subset of resource properties . It assumes that both vectors are sorted .
bool theory_jobscheduler::resource_available(job_resource const& jr, res_available const& ra) const {
        auto const& jps = jr.m_properties;
        auto const& rps = ra.m_properties;
        if (jps.size() > rps.size()) {
            return false;
        }
        unsigned j = 0, i = 0;
        for (; i < jps.size() && j < rps.size(); ) {
            if (jps[i] == rps[j]) {
                ++i; ++j;
            }
            else if (lt(rps[j], jps[i])) {
                ++j;
            }
            else {
                break;
            }            
        }
        return i == jps.size();
    }
bool theory_jobscheduler :: resource_available ( job_resource const & jr , res_available const & ra ) const { auto const & jps = jr . m_properties ; auto const & rps = ra . m_properties ; if ( jps . size ( ) > rps . size ( ) ) { return false ; } unsigned j = 0 , i = 0 ; for ( ; i < jps . size ( ) && j < rps . size ( ) ; ) { if ( jps [ i ] == rps [ j ] ) { ++ i ; ++ j ; } else if ( lt ( rps [ j ] , jps [ i ] ) ) { ++ j ; } else { break ; } } return i == jps . size ( ) ; }
\brief check that job properties is a subset of resource properties.
\ brief check that job properties is a subset of resource properties .