00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef PPL_Bounding_Box_defs_hh
00024 #define PPL_Bounding_Box_defs_hh 1
00025
00026 #include "Coefficient.types.hh"
00027 #include "globals.types.hh"
00028 #include "Coefficient.defs.hh"
00029 #include "Interval.defs.hh"
00030 #include "Constraint_System.defs.hh"
00031 #include <vector>
00032 #include <iosfwd>
00033
00034 namespace Parma_Polyhedra_Library {
00035
00036 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
00038
00043 #endif // PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
00044 class Bounding_Box {
00045 public:
00047 Bounding_Box(dimension_type num_dimensions);
00048
00050 dimension_type space_dimension() const;
00051
00056 const Interval& operator[](dimension_type k) const;
00057
00059 bool is_empty() const;
00060
00082 bool get_lower_bound(dimension_type k, bool& closed,
00083 Coefficient& n, Coefficient& d) const;
00084
00103 bool get_upper_bound(dimension_type k, bool& closed,
00104 Coefficient& n, Coefficient& d) const;
00105
00107 void set_empty();
00108
00120 void raise_lower_bound(dimension_type k, bool closed,
00121 Coefficient_traits::const_reference n,
00122 Coefficient_traits::const_reference d);
00123
00136 void lower_upper_bound(dimension_type k, bool closed,
00137 Coefficient_traits::const_reference n,
00138 Coefficient_traits::const_reference d);
00139
00141 Constraint_System constraints() const;
00142
00153 void CC76_widening_assign(const Bounding_Box& y);
00154
00171 template <typename Iterator>
00172 void CC76_widening_assign(const Bounding_Box& y,
00173 Iterator first, Iterator last);
00174
00175 private:
00180 std::vector<Interval> vec;
00185 mutable bool empty;
00187 mutable bool empty_up_to_date;
00188
00190 static ERational default_stop_points[];
00191 };
00192
00193 namespace IO_Operators {
00194
00195 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
00197
00198 #endif // PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
00199 std::ostream& operator<<(std::ostream& s, const Bounding_Box& bbox);
00200
00201 }
00202
00203 }
00204
00205 #include "Bounding_Box.inlines.hh"
00206
00207 #endif // !defined(PPL_Bounding_Box_defs_hh)