A template class to derive both OR_Matrix::iterator and OR_Matrix::const_iterator. More...
Public Types | |
| typedef std::random_access_iterator_tag | iterator_category |
| typedef Pseudo_Row< U > | value_type |
| typedef long | difference_type |
| typedef const Pseudo_Row< U > * | pointer |
| typedef const Pseudo_Row< U > & | reference |
Public Member Functions | |
| any_row_iterator (dimension_type n_rows) | |
| Constructor to build past-the-end objects. | |
| any_row_iterator (U &base) | |
Builds an iterator pointing at the beginning of an OR_Matrix whose first element is base;. | |
| template<typename V > | |
| any_row_iterator (const any_row_iterator< V > &y) | |
| Copy constructor allowing the construction of a const_iterator from a non-const iterator. | |
| template<typename V > | |
| any_row_iterator & | operator= (const any_row_iterator< V > &y) |
| Assignment operator allowing the assignment of a non-const iterator to a const_iterator. | |
| reference | operator* () const |
| Dereference operator. | |
| pointer | operator-> () const |
| Indirect member selector. | |
| any_row_iterator & | operator++ () |
| Prefix increment operator. | |
| any_row_iterator | operator++ (int) |
| Postfix increment operator. | |
| any_row_iterator & | operator-- () |
| Prefix decrement operator. | |
| any_row_iterator | operator-- (int) |
| Postfix decrement operator. | |
| reference | operator[] (difference_type m) const |
| Subscript operator. | |
| any_row_iterator & | operator+= (difference_type m) |
| Assignment-increment operator. | |
| any_row_iterator & | operator-= (difference_type m) |
| Assignment-decrement operator. | |
| difference_type | operator- (const any_row_iterator &y) const |
Returns the difference between *this and y. | |
| any_row_iterator | operator+ (difference_type m) const |
Returns the sum of *this and m. | |
| any_row_iterator | operator- (difference_type m) const |
Returns the difference of *this and m. | |
| bool | operator== (const any_row_iterator &y) const |
Returns true if and only if *this is equal to y. | |
| bool | operator!= (const any_row_iterator &y) const |
Returns true if and only if *this is different from y. | |
| bool | operator< (const any_row_iterator &y) const |
Returns true if and only if *this is less than y. | |
| bool | operator<= (const any_row_iterator &y) const |
Returns true if and only if *this is less than or equal to y. | |
| bool | operator> (const any_row_iterator &y) const |
Returns true if and only if *this is greater than y. | |
| bool | operator>= (const any_row_iterator &y) const |
Returns true if and only if *this is greater than or equal to y. | |
| dimension_type | row_size () const |
| dimension_type | index () const |
Private Attributes | |
| Pseudo_Row< U > | value |
| Represents the beginning of a row. | |
| dimension_type | e |
| External index. | |
| dimension_type | i |
Internal index: i = (e+1)*(e+1)/2. | |
Friends | |
| class | any_row_iterator |
A template class to derive both OR_Matrix::iterator and OR_Matrix::const_iterator.
Definition at line 202 of file OR_Matrix.defs.hh.
| typedef long Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::difference_type |
Definition at line 206 of file OR_Matrix.defs.hh.
| typedef std::random_access_iterator_tag Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::iterator_category |
Definition at line 204 of file OR_Matrix.defs.hh.
| typedef const Pseudo_Row<U>* Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::pointer |
Definition at line 207 of file OR_Matrix.defs.hh.
| typedef const Pseudo_Row<U>& Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::reference |
Definition at line 208 of file OR_Matrix.defs.hh.
| typedef Pseudo_Row<U> Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::value_type |
Definition at line 205 of file OR_Matrix.defs.hh.
| Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::any_row_iterator | ( | dimension_type | n_rows | ) | [inline] |
Constructor to build past-the-end objects.
Definition at line 130 of file OR_Matrix.inlines.hh.
References Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::e, Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::row_size(), and Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::value.
00131 : value(), 00132 e(n_rows) 00133 // Field `i' is intentionally not initialized here. 00134 { 00135 #if PPL_OR_MATRIX_EXTRA_DEBUG 00136 // Turn `value' into a valid object. 00137 value.size_ = OR_Matrix::row_size(e); 00138 #endif 00139 }
| Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::any_row_iterator | ( | U & | base | ) | [inline, explicit] |
Builds an iterator pointing at the beginning of an OR_Matrix whose first element is base;.
Definition at line 144 of file OR_Matrix.inlines.hh.
00145 : value(base 00146 #if PPL_OR_MATRIX_EXTRA_DEBUG 00147 , OR_Matrix<T>::row_size(0) 00148 #endif 00149 ), 00150 e(0), 00151 i(0) { 00152 }
| Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::any_row_iterator | ( | const any_row_iterator< V > & | y | ) | [inline] |
Copy constructor allowing the construction of a const_iterator from a non-const iterator.
Definition at line 159 of file OR_Matrix.inlines.hh.
| dimension_type Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::index | ( | ) | const [inline] |
Definition at line 347 of file OR_Matrix.inlines.hh.
References Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::e.
00347 { 00348 return e; 00349 }
| bool Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::operator!= | ( | const any_row_iterator< U > & | y | ) | const [inline] |
Returns true if and only if *this is different from y.
Definition at line 303 of file OR_Matrix.inlines.hh.
References Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::e.
00303 { 00304 return e != y.e; 00305 }
| OR_Matrix< T >::template any_row_iterator< U >::reference Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::operator* | ( | ) | const [inline] |
Dereference operator.
Definition at line 179 of file OR_Matrix.inlines.hh.
References Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::value.
00179 { 00180 return value; 00181 }
| OR_Matrix< T >::template any_row_iterator< U > Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::operator+ | ( | difference_type | m | ) | const [inline] |
Returns the sum of *this and m.
Definition at line 276 of file OR_Matrix.inlines.hh.
00276 { 00277 any_row_iterator r = *this; 00278 r += m; 00279 return r; 00280 }
| OR_Matrix< T >::template any_row_iterator< U > Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::operator++ | ( | int | ) | [inline] |
Postfix increment operator.
Definition at line 211 of file OR_Matrix.inlines.hh.
00211 { 00212 any_row_iterator old = *this; 00213 ++(*this); 00214 return old; 00215 }
| OR_Matrix< T >::template any_row_iterator< U > & Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::operator++ | ( | ) | [inline] |
Prefix increment operator.
Definition at line 193 of file OR_Matrix.inlines.hh.
References Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::e, Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::i, and Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::value.
| OR_Matrix< T >::template any_row_iterator< U > & Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::operator+= | ( | difference_type | m | ) | [inline] |
Assignment-increment operator.
Definition at line 246 of file OR_Matrix.inlines.hh.
References Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::e, Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::i, and Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::value.
00246 { 00247 difference_type increment = m + m*m/2 + m*e; 00248 if (e % 2 == 0 && m % 2 != 0) 00249 ++increment; 00250 e += m; 00251 i += increment; 00252 value.first += increment; 00253 #if PPL_OR_MATRIX_EXTRA_DEBUG 00254 value.size_ += (m - m%2); 00255 #endif 00256 return *this; 00257 }
| OR_Matrix< T >::template any_row_iterator< U > Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::operator- | ( | difference_type | m | ) | const [inline] |
Returns the difference of *this and m.
Definition at line 285 of file OR_Matrix.inlines.hh.
00285 { 00286 any_row_iterator r = *this; 00287 r -= m; 00288 return r; 00289 }
| OR_Matrix< T >::template any_row_iterator< U >::difference_type Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::operator- | ( | const any_row_iterator< U > & | y | ) | const [inline] |
Returns the difference between *this and y.
Definition at line 269 of file OR_Matrix.inlines.hh.
References Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::e.
00269 { 00270 return e - y.e; 00271 }
| OR_Matrix< T >::template any_row_iterator< U > Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::operator-- | ( | int | ) | [inline] |
Postfix decrement operator.
Definition at line 237 of file OR_Matrix.inlines.hh.
00237 { 00238 any_row_iterator old = *this; 00239 --(*this); 00240 return old; 00241 }
| OR_Matrix< T >::template any_row_iterator< U > & Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::operator-- | ( | ) | [inline] |
Prefix decrement operator.
Definition at line 220 of file OR_Matrix.inlines.hh.
References Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::e, Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::i, and Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::value.
| OR_Matrix< T >::template any_row_iterator< U > & Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::operator-= | ( | difference_type | m | ) | [inline] |
Assignment-decrement operator.
Definition at line 262 of file OR_Matrix.inlines.hh.
| OR_Matrix< T >::template any_row_iterator< U >::pointer Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::operator-> | ( | ) | const [inline] |
Indirect member selector.
Definition at line 186 of file OR_Matrix.inlines.hh.
References Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::value.
00186 { 00187 return &value; 00188 }
| bool Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::operator< | ( | const any_row_iterator< U > & | y | ) | const [inline] |
Returns true if and only if *this is less than y.
Definition at line 310 of file OR_Matrix.inlines.hh.
References Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::e.
00310 { 00311 return e < y.e; 00312 }
| bool Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::operator<= | ( | const any_row_iterator< U > & | y | ) | const [inline] |
Returns true if and only if *this is less than or equal to y.
Definition at line 318 of file OR_Matrix.inlines.hh.
References Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::e.
00318 { 00319 return e <= y.e; 00320 }
| OR_Matrix< T >::template any_row_iterator< U > & Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::operator= | ( | const any_row_iterator< V > & | y | ) | [inline] |
Assignment operator allowing the assignment of a non-const iterator to a const_iterator.
Definition at line 169 of file OR_Matrix.inlines.hh.
References Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::e, Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::i, and Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::value.
| bool Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::operator== | ( | const any_row_iterator< U > & | y | ) | const [inline] |
Returns true if and only if *this is equal to y.
Definition at line 295 of file OR_Matrix.inlines.hh.
References Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::e.
00295 { 00296 return e == y.e; 00297 }
| bool Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::operator> | ( | const any_row_iterator< U > & | y | ) | const [inline] |
Returns true if and only if *this is greater than y.
Definition at line 325 of file OR_Matrix.inlines.hh.
References Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::e.
00325 { 00326 return e > y.e; 00327 }
| bool Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::operator>= | ( | const any_row_iterator< U > & | y | ) | const [inline] |
Returns true if and only if *this is greater than or equal to y.
Definition at line 333 of file OR_Matrix.inlines.hh.
References Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::e.
00333 { 00334 return e >= y.e; 00335 }
| reference Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::operator[] | ( | difference_type | m | ) | const |
Subscript operator.
| dimension_type Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::row_size | ( | ) | const [inline] |
Definition at line 340 of file OR_Matrix.inlines.hh.
References Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::e.
Referenced by Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::any_row_iterator().
00340 { 00341 return OR_Matrix::row_size(e); 00342 }
Definition at line 317 of file OR_Matrix.defs.hh.
dimension_type Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::e [private] |
External index.
Definition at line 305 of file OR_Matrix.defs.hh.
Referenced by Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::any_row_iterator(), Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::index(), Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::operator!=(), Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::operator++(), Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::operator+=(), Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::operator-(), Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::operator--(), Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::operator<(), Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::operator<=(), Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::operator=(), Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::operator==(), Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::operator>(), Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::operator>=(), and Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::row_size().
dimension_type Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::i [private] |
Internal index: i = (e+1)*(e+1)/2.
Definition at line 308 of file OR_Matrix.defs.hh.
Referenced by Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::operator++(), Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::operator+=(), Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::operator--(), and Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::operator=().
Pseudo_Row<U> Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::value [private] |
Represents the beginning of a row.
Definition at line 302 of file OR_Matrix.defs.hh.
Referenced by Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::any_row_iterator(), Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::operator*(), Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::operator++(), Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::operator+=(), Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::operator--(), Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::operator->(), and Parma_Polyhedra_Library::OR_Matrix< T >::any_row_iterator< U >::operator=().
1.6.3