An iterator over a system of generators. More...
#include <Generator_System.defs.hh>


Public Member Functions | |
| const_iterator () | |
| Default constructor. | |
| const_iterator (const const_iterator &y) | |
| Ordinary copy constructor. | |
| ~const_iterator () | |
| Destructor. | |
| const_iterator & | operator= (const const_iterator &y) |
| Assignment operator. | |
| const Generator & | operator* () const |
| Dereference operator. | |
| const Generator * | operator-> () const |
| Indirect member selector. | |
| const_iterator & | operator++ () |
| Prefix increment operator. | |
| const_iterator | operator++ (int) |
| Postfix increment operator. | |
| bool | operator== (const const_iterator &y) const |
Returns true if and only if *this and y are identical. | |
| bool | operator!= (const const_iterator &y) const |
Returns true if and only if *this and y are different. | |
Private Member Functions | |
| const_iterator (const Linear_System::const_iterator &iter, const Generator_System &gsys) | |
| Constructor. | |
| void | skip_forward () |
*this skips to the next generator, skipping those closure points that are immediately followed by a matching point. | |
Private Attributes | |
| Linear_System::const_iterator | i |
| The const iterator over the Linear_System. | |
| const Linear_System * | gsp |
| A const pointer to the Linear_System. | |
Friends | |
| class | Generator_System |
An iterator over a system of generators.
A const_iterator is used to provide read-only access to each generator contained in an object of Generator_System.
ph: const Generator_System& gs = ph.generators(); for (Generator_System::const_iterator i = gs.begin(), gs_end = gs.end(); i != gs_end; ++i) cout << *i << endl;
const Generator_System& gs = ph.generators(); copy(gs.begin(), gs.end(), ostream_iterator<Generator>(cout, "\n"));
Definition at line 250 of file Generator_System.defs.hh.
| Parma_Polyhedra_Library::Generator_System::const_iterator::const_iterator | ( | ) | [inline] |
Default constructor.
Reimplemented in Parma_Polyhedra_Library::Grid_Generator_System::const_iterator.
Definition at line 95 of file Generator_System.inlines.hh.
| Parma_Polyhedra_Library::Generator_System::const_iterator::const_iterator | ( | const const_iterator & | y | ) | [inline] |
Ordinary copy constructor.
Reimplemented in Parma_Polyhedra_Library::Grid_Generator_System::const_iterator.
Definition at line 100 of file Generator_System.inlines.hh.
| Parma_Polyhedra_Library::Generator_System::const_iterator::~const_iterator | ( | ) | [inline] |
Destructor.
Reimplemented in Parma_Polyhedra_Library::Grid_Generator_System::const_iterator.
Definition at line 105 of file Generator_System.inlines.hh.
| Parma_Polyhedra_Library::Generator_System::const_iterator::const_iterator | ( | const Linear_System::const_iterator & | iter, | |
| const Generator_System & | gsys | |||
| ) | [inline, private] |
Constructor.
Definition at line 153 of file Generator_System.inlines.hh.
| bool Parma_Polyhedra_Library::Generator_System::const_iterator::operator!= | ( | const const_iterator & | y | ) | const [inline] |
Returns true if and only if *this and y are different.
Reimplemented in Parma_Polyhedra_Library::Grid_Generator_System::const_iterator.
Definition at line 147 of file Generator_System.inlines.hh.
References Parma_Polyhedra_Library::Matrix::const_iterator::i, and i.
00147 { 00148 return i != y.i; 00149 }
| const Generator & Parma_Polyhedra_Library::Generator_System::const_iterator::operator* | ( | ) | const [inline] |
Dereference operator.
Reimplemented in Parma_Polyhedra_Library::Grid_Generator_System::const_iterator.
Definition at line 117 of file Generator_System.inlines.hh.
| Generator_System::const_iterator Parma_Polyhedra_Library::Generator_System::const_iterator::operator++ | ( | int | ) | [inline] |
Postfix increment operator.
Reimplemented in Parma_Polyhedra_Library::Grid_Generator_System::const_iterator.
Definition at line 135 of file Generator_System.inlines.hh.
References operator++().
00135 { 00136 const const_iterator tmp = *this; 00137 operator++(); 00138 return tmp; 00139 }
| Generator_System::const_iterator & Parma_Polyhedra_Library::Generator_System::const_iterator::operator++ | ( | ) | [inline] |
Prefix increment operator.
Reimplemented in Parma_Polyhedra_Library::Grid_Generator_System::const_iterator.
Definition at line 127 of file Generator_System.inlines.hh.
References gsp, i, Parma_Polyhedra_Library::Linear_System::is_necessarily_closed(), and skip_forward().
Referenced by operator++().
00127 { 00128 ++i; 00129 if (!gsp->is_necessarily_closed()) 00130 skip_forward(); 00131 return *this; 00132 }
| const Generator * Parma_Polyhedra_Library::Generator_System::const_iterator::operator-> | ( | ) | const [inline] |
Indirect member selector.
Reimplemented in Parma_Polyhedra_Library::Grid_Generator_System::const_iterator.
Definition at line 122 of file Generator_System.inlines.hh.
References i.
00122 { 00123 return static_cast<const Generator*>(i.operator->()); 00124 }
| Generator_System::const_iterator & Parma_Polyhedra_Library::Generator_System::const_iterator::operator= | ( | const const_iterator & | y | ) | [inline] |
Assignment operator.
Reimplemented in Parma_Polyhedra_Library::Grid_Generator_System::const_iterator.
Definition at line 110 of file Generator_System.inlines.hh.
References gsp, Parma_Polyhedra_Library::Matrix::const_iterator::i, and i.
| bool Parma_Polyhedra_Library::Generator_System::const_iterator::operator== | ( | const const_iterator & | y | ) | const [inline] |
Returns true if and only if *this and y are identical.
Reimplemented in Parma_Polyhedra_Library::Grid_Generator_System::const_iterator.
Definition at line 142 of file Generator_System.inlines.hh.
References Parma_Polyhedra_Library::Matrix::const_iterator::i, and i.
00142 { 00143 return i == y.i; 00144 }
| void Parma_Polyhedra_Library::Generator_System::const_iterator::skip_forward | ( | ) | [private] |
*this skips to the next generator, skipping those closure points that are immediately followed by a matching point.
Definition at line 266 of file Generator_System.cc.
References Parma_Polyhedra_Library::Matrix::end(), gsp, i, Parma_Polyhedra_Library::Generator::is_closure_point(), Parma_Polyhedra_Library::Generator::is_matching_closure_point(), and Parma_Polyhedra_Library::Generator::is_point().
Referenced by operator++().
00266 { 00267 const Linear_System::const_iterator gsp_end = gsp->end(); 00268 if (i != gsp_end) { 00269 Linear_System::const_iterator i_next = i; 00270 ++i_next; 00271 if (i_next != gsp_end) { 00272 const Generator& cp = static_cast<const Generator&>(*i); 00273 const Generator& p = static_cast<const Generator&>(*i_next); 00274 if (cp.is_closure_point() 00275 && p.is_point() 00276 && cp.is_matching_closure_point(p)) 00277 i = i_next; 00278 } 00279 } 00280 }
friend class Generator_System [friend] |
Definition at line 294 of file Generator_System.defs.hh.
A const pointer to the Linear_System.
Definition at line 300 of file Generator_System.defs.hh.
Referenced by operator++(), operator=(), and skip_forward().
Linear_System::const_iterator Parma_Polyhedra_Library::Generator_System::const_iterator::i [private] |
The const iterator over the Linear_System.
Definition at line 297 of file Generator_System.defs.hh.
Referenced by operator!=(), operator++(), operator->(), operator=(), operator==(), and skip_forward().
1.6.3