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_Generator_System_inlines_hh
00024 #define PPL_Generator_System_inlines_hh 1
00025
00026 #include "Generator.defs.hh"
00027
00028 namespace Parma_Polyhedra_Library {
00029
00030 inline
00031 Generator_System::Generator_System()
00032 : Linear_System(NECESSARILY_CLOSED) {
00033 }
00034
00035 inline
00036 Generator_System::Generator_System(const Generator& g)
00037 : Linear_System(g.topology()) {
00038 Linear_System::insert(g);
00039 }
00040
00041 inline
00042 Generator_System::Generator_System(const Generator_System& gs)
00043 : Linear_System(gs) {
00044 }
00045
00046 inline
00047 Generator_System::Generator_System(const Topology topol)
00048 : Linear_System(topol) {
00049 }
00050
00051 inline
00052 Generator_System::Generator_System(const Topology topol,
00053 const dimension_type n_rows,
00054 const dimension_type n_columns)
00055 : Linear_System(topol, n_rows, n_columns) {
00056 }
00057
00058 inline
00059 Generator_System::~Generator_System() {
00060 }
00061
00062 inline Generator_System&
00063 Generator_System::operator=(const Generator_System& y) {
00064 Linear_System::operator=(y);
00065 return *this;
00066 }
00067
00068 inline dimension_type
00069 Generator_System::max_space_dimension() {
00070 return Linear_System::max_space_dimension();
00071 }
00072
00073 inline dimension_type
00074 Generator_System::space_dimension() const {
00075 return Linear_System::space_dimension();
00076 }
00077
00078 inline void
00079 Generator_System::clear() {
00080 Linear_System::clear();
00081 }
00082
00083 inline Generator&
00084 Generator_System::operator[](const dimension_type k) {
00085 return static_cast<Generator&>(Linear_System::operator[](k));
00086 }
00087
00088 inline const Generator&
00089 Generator_System::operator[](const dimension_type k) const {
00090 return static_cast<const Generator&>(Linear_System::operator[](k));
00091 }
00092
00093 inline
00094 Generator_System::const_iterator::const_iterator()
00095 : i(), gsp(0) {
00096 }
00097
00098 inline
00099 Generator_System::const_iterator::const_iterator(const const_iterator& y)
00100 : i(y.i), gsp(y.gsp) {
00101 }
00102
00103 inline
00104 Generator_System::const_iterator::~const_iterator() {
00105 }
00106
00107 inline
00108 Generator_System::const_iterator&
00109 Generator_System::const_iterator::operator=(const const_iterator& y) {
00110 i = y.i;
00111 gsp = y.gsp;
00112 return *this;
00113 }
00114
00115 inline const Generator&
00116 Generator_System::const_iterator::operator*() const {
00117 return static_cast<const Generator&>(*i);
00118 }
00119
00120 inline const Generator*
00121 Generator_System::const_iterator::operator->() const {
00122 return static_cast<const Generator*>(i.operator->());
00123 }
00124
00125 inline Generator_System::const_iterator&
00126 Generator_System::const_iterator::operator++() {
00127 ++i;
00128 if (!gsp->is_necessarily_closed())
00129 skip_forward();
00130 return *this;
00131 }
00132
00133 inline Generator_System::const_iterator
00134 Generator_System::const_iterator::operator++(int) {
00135 const const_iterator tmp = *this;
00136 operator++();
00137 return tmp;
00138 }
00139
00140 inline bool
00141 Generator_System::const_iterator::operator==(const const_iterator& y) const {
00142 return i == y.i;
00143 }
00144
00145 inline bool
00146 Generator_System::const_iterator::operator!=(const const_iterator& y) const {
00147 return i != y.i;
00148 }
00149
00150 inline
00151 Generator_System::const_iterator::
00152 const_iterator(const Linear_System::const_iterator& iter,
00153 const Generator_System& gsys)
00154 : i(iter), gsp(&gsys) {
00155 }
00156
00157 inline Generator_System::const_iterator
00158 Generator_System::begin() const {
00159 const_iterator i(Linear_System::begin(), *this);
00160 if (!is_necessarily_closed())
00161 i.skip_forward();
00162 return i;
00163 }
00164
00165 inline Generator_System::const_iterator
00166 Generator_System::end() const {
00167 const const_iterator i(Linear_System::end(), *this);
00168 return i;
00169 }
00170
00171 inline const Generator_System&
00172 Generator_System::zero_dim_univ() {
00173 static const Generator_System zdu(Generator::zero_dim_point());
00174 return zdu;
00175 }
00176
00177 inline void
00178 Generator_System::swap(Generator_System& y) {
00179 Linear_System::swap(y);
00180 }
00181
00182 inline memory_size_type
00183 Generator_System::external_memory_in_bytes() const {
00184 return Linear_System::external_memory_in_bytes();
00185 }
00186
00187 inline memory_size_type
00188 Generator_System::total_memory_in_bytes() const {
00189 return Linear_System::total_memory_in_bytes();
00190 }
00191
00192 inline void
00193 Generator_System::simplify() {
00194 Linear_System::simplify();
00195 remove_invalid_lines_and_rays();
00196 }
00197
00198 }
00199
00200
00201 namespace std {
00202
00204 inline void
00205 swap(Parma_Polyhedra_Library::Generator_System& x,
00206 Parma_Polyhedra_Library::Generator_System& y) {
00207 x.swap(y);
00208 }
00209
00210 }
00211
00212 #endif // !defined(PPL_Generator_System_inlines_hh)