SpinParser  1.0
Public Member Functions | Protected Attributes | Friends | List of all members
LatticeIterator Struct Reference

Lattice iterator object. More...

#include <Lattice.hpp>

Inheritance diagram for LatticeIterator:
Inheritance graph
[legend]

Public Member Functions

 LatticeIterator ()
 Construct a new LatticeIterator object, which points to the representative id 0 per default.
 
 LatticeIterator (int id)
 Construct a new LatticeIterator object and initialize it to any representative id. More...
 
bool operator== (const LatticeIterator &rhs) const
 Comparison operator. More...
 
bool operator!= (const LatticeIterator &rhs) const
 Negative comparison operator. More...
 
int operator- (const LatticeIterator &rhs) const
 Subtraction operator. More...
 
virtual LatticeIteratoroperator++ ()
 Prefix increment operator. More...
 
virtual LatticeIteratoroperator-- ()
 Prefix decrement operator. More...
 

Protected Attributes

int id
 Representative id which the iterator points to.
 

Friends

struct Lattice
 

Detailed Description

Lattice iterator object.

Constructor & Destructor Documentation

◆ LatticeIterator()

LatticeIterator::LatticeIterator ( int  id)
inline

Construct a new LatticeIterator object and initialize it to any representative id.

Parameters
idRepresentative id to initialize.

Member Function Documentation

◆ operator!=()

bool LatticeIterator::operator!= ( const LatticeIterator rhs) const
inline

Negative comparison operator.

Parameters
rhsRight hand side operand.
Returns
bool Returns false, if both iterators point to the same representative id. Returns true otherwise.

◆ operator++()

virtual LatticeIterator& LatticeIterator::operator++ ( )
inlinevirtual

Prefix increment operator.

Returns
LatticeIterator& Reference to self.

Reimplemented in SublatticeIterator.

◆ operator-()

int LatticeIterator::operator- ( const LatticeIterator rhs) const
inline

Subtraction operator.

Parameters
rhsRight hand side operand.
Returns
int Difference between iterators.

◆ operator--()

virtual LatticeIterator& LatticeIterator::operator-- ( )
inlinevirtual

Prefix decrement operator.

Returns
LatticeIterator& Reference to self.

Reimplemented in SublatticeIterator.

◆ operator==()

bool LatticeIterator::operator== ( const LatticeIterator rhs) const
inline

Comparison operator.

Parameters
rhsRight hand side operand.
Returns
bool Returns true, if both iterators point to the same representative id. Returns false otherwise.

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