- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

# /home/coin/svn-release/Smi-0.93.1/FlopCpp/src/MP_boolean.hpp

Go to the documentation of this file.

    00001 // ******************** FlopCpp **********************************************
    00002 // File: MP_boolean.hpp
    00003 // $Id$
    00004 // Author: Tim Helge Hultberg (thh@mat.ua.pt)
    00005 // Copyright (C) 2003 Tim Helge Hultberg
    00006 // All Rights Reserved.
    00007 // ****************************************************************************
    00008
    00009 #ifndef _MP_boolean_hpp_
    00010 #define _MP_boolean_hpp_
    00011
    00012 #include "MP_index.hpp"
    00013 #include "MP_constant.hpp"
    00014 #include "MP_utilities.hpp"
    00015
    00016 namespace flopc {
    00017
    00023     class Boolean_base {
    00024         friend class Handle<Boolean_base*>;
    00025         friend class MP_boolean;
    00026     public:
    00027         virtual bool evaluate() const = 0;
    00028     protected:
    00029         Boolean_base() : count(0) {}
    00030         virtual ~Boolean_base() {}
    00031
    00032         int count;
    00033     };
    00034
    00035     class SUBSETREF;
    00036
    00045     class MP_boolean : public Handle<Boolean_base*> {
    00046         friend class MP_domain_base_;
    00047     public:
    00048         MP_boolean() : Handle<Boolean_base*>(0) {}
    00049         MP_boolean(bool b);
    00050         MP_boolean(const Constant& c);
    00051         MP_boolean(SUBSETREF& c);
    00052         MP_boolean(Boolean_base* r) : Handle<Boolean_base*>(r) {}
    00053
    00054     };
    00055
    00063     MP_boolean operator!(const MP_boolean& b);
    00064
    00073     MP_boolean operator&&(const MP_boolean& e1, const MP_boolean& e2);
    00082     MP_boolean operator||(const MP_boolean& e1, const MP_boolean& e2);
    00083
    00092     MP_boolean alltrue(const MP_domain& d, const MP_boolean& b);
    00093
    00111     MP_boolean operator<=(const MP_index_exp& e1, const MP_index_exp& e2);
    00119     MP_boolean operator<=(const Constant& e1, const Constant& e2);
    00129     MP_boolean operator<(const MP_index_exp& e1, const MP_index_exp& e2);
    00137     MP_boolean operator<(const Constant& e1, const Constant& e2);
    00147     MP_boolean operator>=(const MP_index_exp& e1, const MP_index_exp& e2);
    00155     MP_boolean operator>=(const Constant& e1, const Constant& e2);
    00165     MP_boolean operator>(const MP_index_exp& e1, const MP_index_exp& e2);
    00173     MP_boolean operator>(const Constant& e1, const Constant& e2);
    00183     MP_boolean operator==(const MP_index_exp& e1, const MP_index_exp& e2);
    00191     MP_boolean operator==(const Constant& e1, const Constant& e2);
    00201     MP_boolean operator!=(const MP_index_exp& e1, const MP_index_exp& e2);
    00209     MP_boolean operator!=(const Constant& e1, const Constant& e2);
    00210
    00211 } // End of namespace flopc
    00212 #endif