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_Grid_Generator_System_defs_hh
00024 #define PPL_Grid_Generator_System_defs_hh 1
00025
00026 #include "Grid_Generator_System.types.hh"
00027 #include "Generator_System.defs.hh"
00028 #include "Grid_Generator.types.hh"
00029 #include "Variable.defs.hh"
00030 #include <iosfwd>
00031
00032 namespace Parma_Polyhedra_Library {
00033
00034 namespace IO_Operators {
00035
00037
00042 std::ostream& operator<<(std::ostream& s, const Grid_Generator_System& gs);
00043
00044 }
00045
00047
00048 bool operator==(const Grid_Generator_System& x,
00049 const Grid_Generator_System& y);
00050
00051 }
00052
00053 namespace std {
00054
00056
00057 void swap(Parma_Polyhedra_Library::Grid_Generator_System& x,
00058 Parma_Polyhedra_Library::Grid_Generator_System& y);
00059
00060 }
00061
00062
00064
00177 class Parma_Polyhedra_Library::Grid_Generator_System
00178 : private Generator_System {
00179 public:
00180
00181
00183 Grid_Generator_System();
00184
00186 Grid_Generator_System(const Grid_Generator_System& gs);
00187
00189 explicit Grid_Generator_System(dimension_type dim);
00190
00192 explicit Grid_Generator_System(const Grid_Generator& g);
00193
00195 static dimension_type max_space_dimension();
00196
00198 dimension_type space_dimension() const;
00199
00204 void clear();
00205
00214 void insert(const Grid_Generator& g);
00215
00220 void recycling_insert(Grid_Generator& g);
00221
00226 void recycling_insert(Grid_Generator_System& gs);
00227
00229
00249 class const_iterator
00250 : public std::iterator<std::forward_iterator_tag,
00251 Grid_Generator,
00252 ptrdiff_t,
00253 const Grid_Generator*,
00254 const Grid_Generator&>,
00255 private Generator_System::const_iterator {
00256 public:
00258 const_iterator();
00259
00261 const_iterator(const const_iterator& y);
00262
00264 ~const_iterator();
00265
00267 const_iterator& operator=(const const_iterator& y);
00268
00270 const Grid_Generator& operator*() const;
00271
00273 const Grid_Generator* operator->() const;
00274
00276 const_iterator& operator++();
00277
00279 const_iterator operator++(int);
00280
00285 bool operator==(const const_iterator& y) const;
00286
00291 bool operator!=(const const_iterator& y) const;
00292
00293 private:
00294 friend class Grid_Generator_System;
00295
00297 const_iterator(const Generator_System::const_iterator& y);
00298 };
00299
00305 const_iterator begin() const;
00306
00308 const_iterator end() const;
00309
00311 void swap(Grid_Generator_System& y);
00312
00314 memory_size_type external_memory_in_bytes() const;
00315
00317 memory_size_type total_memory_in_bytes() const;
00318
00320
00348 void affine_image(dimension_type v,
00349 const Linear_Expression& expr,
00350 Coefficient_traits::const_reference denominator);
00351
00353 dimension_type num_generators() const;
00354
00356 dimension_type num_parameters() const;
00357
00359 dimension_type num_lines() const;
00360
00365 bool has_points() const;
00366
00368 bool is_equal_to(const Grid_Generator_System y) const;
00369
00371 Grid_Generator& operator[](dimension_type k);
00372
00374 const Grid_Generator& operator[](dimension_type k) const;
00375
00376 PPL_OUTPUT_DECLARATIONS;
00377
00378 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
00379
00388 #endif // PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
00389 bool ascii_load(std::istream& s);
00390
00392
00396 bool OK() const;
00397
00412 void add_universe_rows_and_columns(dimension_type dims);
00413
00415
00420 void remove_space_dimensions(const Variables_Set& to_be_removed);
00421
00430 void remove_higher_space_dimensions(dimension_type new_dimension);
00431
00432 private:
00433 friend bool operator==(const Grid_Generator_System& x,
00434 const Grid_Generator_System& y);
00435
00436
00437
00438 friend class Grid;
00439
00441 void set_sorted(bool b);
00442
00444 void unset_pending_rows();
00445
00447 void set_index_first_pending_row(dimension_type i);
00448
00450
00461 void resize_no_copy(dimension_type new_n_rows,
00462 dimension_type new_n_columns);
00463
00468 dimension_type num_columns() const;
00469
00474 void erase_to_end(dimension_type first_to_erase);
00475
00477
00478
00479
00480
00481
00482
00483
00484
00485
00486
00487
00488
00489
00490
00491
00492 void permute_columns(const std::vector<dimension_type>& cycles);
00493 };
00494
00495
00496
00497 #endif // !defined(PPL_Grid_Generator_System_defs_hh)