00001 /* Non-inline functions for the Interval class and its constituents. 00002 Copyright (C) 2001-2006 Roberto Bagnara <bagnara@cs.unipr.it> 00003 00004 This file is part of the Parma Polyhedra Library (PPL). 00005 00006 The PPL is free software; you can redistribute it and/or modify it 00007 under the terms of the GNU General Public License as published by the 00008 Free Software Foundation; either version 2 of the License, or (at your 00009 option) any later version. 00010 00011 The PPL is distributed in the hope that it will be useful, but WITHOUT 00012 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00013 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00014 for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with this program; if not, write to the Free Software Foundation, 00018 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307, USA. 00019 00020 For the most up-to-date information see the Parma Polyhedra Library 00021 site: http://www.cs.unipr.it/ppl/ . */ 00022 00023 #include <config.h> 00024 00025 #include "Interval.defs.hh" 00026 #include <iostream> 00027 00028 namespace PPL = Parma_Polyhedra_Library; 00029 00030 bool 00031 PPL::LBoundary::OK() const { 00032 if (flag != POS && flag != ZERO) { 00033 #ifndef NDEBUG 00034 std::cerr << "Invalid flag in LBoundary: " << flag << std::endl; 00035 #endif 00036 return false; 00037 } 00038 return true; 00039 } 00040 00041 bool 00042 PPL::UBoundary::OK() const { 00043 if (flag != NEG && flag != ZERO) { 00044 #ifndef NDEBUG 00045 std::cerr << "Invalid flag in UBoundary: " << flag << std::endl; 00046 #endif 00047 return false; 00048 } 00049 return true; 00050 } 00051 00052 bool 00053 PPL::Interval::OK() const { 00054 return lower.OK() && upper.OK(); 00055 }