All Downloads are FREE. Search and download functionalities are using the official Maven repository.

z3-z3-4.13.0.src.util.mpbqi.h Maven / Gradle / Ivy

The newest version!
/*++
Copyright (c) 2012 Microsoft Corporation

Module Name:

    mpbqi.h

Abstract:

    Binary Rational Number Intervals

Author:

    Leonardo de Moura (leonardo) 2012-01-04

Revision History:

--*/
#pragma once

#include "util/mpbq.h"
#include "util/basic_interval.h"

class mpbqi_manager : public basic_interval_manager {
    typedef basic_interval_manager super;
public:
    mpbqi_manager(mpbq_manager & m):super(m) {}

    void set(interval & a, interval const & b) { super::set(a, b); }
    void set(interval & a, bound const & lower, bound const & upper) { super::set(a, lower, upper); }
    void set(interval & a, bound const & n) { super::set(a, n); }
    void set(interval & a, mpz const & n) {
        m().set(a.lower(), n);
        m().set(a.upper(), n);
    }

    void add(interval const & a, interval const & b, interval & c) { super::add(a, b, c); }
    void add(interval const & a, mpz const & b, interval & c) { 
        m().add(a.lower(), b, c.lower());
        m().add(a.upper(), b, c.upper());
    }
    

};

typedef mpbqi_manager::interval mpbqi;
typedef mpbqi_manager::scoped_interval scoped_mpbqi;





© 2015 - 2024 Weber Informatics LLC | Privacy Policy