Regina 7.3 Calculation Engine
Public Types | Public Member Functions | Friends | List of all members
regina::NormalHypersurfaces::VectorIterator Class Reference

A bidirectional iterator that runs through the raw vectors for hypersurfaces in this list. More...

#include <hypersurface/normalhypersurfaces.h>

Public Types

using iterator_category = std::bidirectional_iterator_tag
 Declares this to be a bidirectional iterator type. More...
 
using value_type = Vector< LargeInteger >
 Indicates what type the iterator points to. More...
 
using difference_type = typename std::vector< NormalHypersurface >::const_iterator::difference_type
 The type obtained by subtracting iterators. More...
 
using pointer = const Vector< LargeInteger > *
 A pointer to value_type. More...
 
using reference = const Vector< LargeInteger > &
 The type obtained when dereferencing iterators. More...
 

Public Member Functions

 VectorIterator ()=default
 Creates a new uninitialised iterator. More...
 
 VectorIterator (const VectorIterator &cloneMe)=default
 Creates a copy of the given iterator. More...
 
VectorIteratoroperator= (const VectorIterator &cloneMe)=default
 Makes this a copy of the given iterator. More...
 
bool operator== (const VectorIterator &other) const
 Compares this with the given iterator for equality. More...
 
bool operator!= (const VectorIterator &other) const
 Compares this with the given iterator for inequality. More...
 
const Vector< LargeInteger > & operator* () const
 Returns the raw vector for the normal hypersurface that this iterator is currently pointing to. More...
 
VectorIteratoroperator++ ()
 The preincrement operator. More...
 
VectorIterator operator++ (int)
 The postincrement operator. More...
 
VectorIteratoroperator-- ()
 The predecrement operator. More...
 
VectorIterator operator-- (int)
 The postdecrement operator. More...
 

Friends

class NormalHypersurfaces
 

Detailed Description

A bidirectional iterator that runs through the raw vectors for hypersurfaces in this list.

Python
Not present. Instead NormalHypersurfaces::vectors() returns an object of a different (hidden) class that supports the Python iterable/iterator interface.

Member Typedef Documentation

◆ difference_type

using regina::NormalHypersurfaces::VectorIterator::difference_type = typename std::vector<NormalHypersurface>::const_iterator::difference_type

The type obtained by subtracting iterators.

◆ iterator_category

using regina::NormalHypersurfaces::VectorIterator::iterator_category = std::bidirectional_iterator_tag

Declares this to be a bidirectional iterator type.

◆ pointer

A pointer to value_type.

◆ reference

The type obtained when dereferencing iterators.

◆ value_type

Indicates what type the iterator points to.

Constructor & Destructor Documentation

◆ VectorIterator() [1/2]

regina::NormalHypersurfaces::VectorIterator::VectorIterator ( )
default

Creates a new uninitialised iterator.

◆ VectorIterator() [2/2]

regina::NormalHypersurfaces::VectorIterator::VectorIterator ( const VectorIterator cloneMe)
default

Creates a copy of the given iterator.

Parameters
cloneMethe iterator to clone.

Member Function Documentation

◆ operator!=()

bool regina::NormalHypersurfaces::VectorIterator::operator!= ( const VectorIterator other) const
inline

Compares this with the given iterator for inequality.

Parameters
otherthe iterator to compare this with.
Returns
false if the iterators point to the same element of the same normal surface list, or true if they do not.

◆ operator*()

const Vector< LargeInteger > & regina::NormalHypersurfaces::VectorIterator::operator* ( ) const
inline

Returns the raw vector for the normal hypersurface that this iterator is currently pointing to.

Precondition
This iterator is dereferenceable (in particular, it is not past-the-end).
Returns
the corresponding normal hypersurface vector.

◆ operator++() [1/2]

NormalHypersurfaces::VectorIterator & regina::NormalHypersurfaces::VectorIterator::operator++ ( )
inline

The preincrement operator.

Returns
a reference to this iterator after the increment.

◆ operator++() [2/2]

NormalHypersurfaces::VectorIterator regina::NormalHypersurfaces::VectorIterator::operator++ ( int  )
inline

The postincrement operator.

Returns
a copy of this iterator before the increment took place.

◆ operator--() [1/2]

NormalHypersurfaces::VectorIterator & regina::NormalHypersurfaces::VectorIterator::operator-- ( )
inline

The predecrement operator.

Returns
a reference to this iterator after the decrement.

◆ operator--() [2/2]

NormalHypersurfaces::VectorIterator regina::NormalHypersurfaces::VectorIterator::operator-- ( int  )
inline

The postdecrement operator.

Returns
a copy of this iterator before the decrement took place.

◆ operator=()

VectorIterator & regina::NormalHypersurfaces::VectorIterator::operator= ( const VectorIterator cloneMe)
default

Makes this a copy of the given iterator.

Parameters
cloneMethe iterator to clone.
Returns
a reference to this iterator.

◆ operator==()

bool regina::NormalHypersurfaces::VectorIterator::operator== ( const VectorIterator other) const
inline

Compares this with the given iterator for equality.

Parameters
otherthe iterator to compare this with.
Returns
true if the iterators point to the same element of the same normal surface list, or false if they do not.

The documentation for this class was generated from the following file:

Copyright © 1999-2023, The Regina development team
This software is released under the GNU General Public License, with some additional permissions; see the source code for details.
For further information, or to submit a bug or other problem, please contact Ben Burton (bab@maths.uq.edu.au).