Version: SMASH-2.0
smash::I_tot_range::iterator Class Reference

#include <clebschgordan.h>

Iterator class for determination of total isospin.

Definition at line 133 of file clebschgordan.h.

Inheritance diagram for smash::I_tot_range::iterator:
[legend]
Collaboration diagram for smash::I_tot_range::iterator:
[legend]

Public Member Functions

 iterator (int start, I_tot_range &parent)
 Construct an iterator. More...
 
int operator* ()
 
const iteratoroperator++ ()
 
iterator operator++ (int)
 
bool operator== (const iterator &other)
 
bool operator!= (const iterator &other)
 

Private Attributes

int c_
 Element of the iterator. More...
 
I_tot_rangeparent_
 Parent class giving the total isospin range. More...
 

Constructor & Destructor Documentation

◆ iterator()

smash::I_tot_range::iterator::iterator ( int  start,
I_tot_range parent 
)
inline

Construct an iterator.

Parameters
startInitial value.
parentParent class giving the total isospin range.
Returns
The constructed iterator.

Definition at line 147 of file clebschgordan.h.

147 : c_(start), parent_(parent) {}
Here is the caller graph for this function:

Member Function Documentation

◆ operator*()

int smash::I_tot_range::iterator::operator* ( )
inline
Returns
Current element of the iterator.

Definition at line 149 of file clebschgordan.h.

149 { return c_; }

◆ operator++() [1/2]

const iterator* smash::I_tot_range::iterator::operator++ ( )
inline
Returns
Next element of the iterator.

Definition at line 151 of file clebschgordan.h.

151  {
152  c_ -= 2;
153  return this;
154  }

◆ operator++() [2/2]

iterator smash::I_tot_range::iterator::operator++ ( int  )
inline
Returns
Next element of the iterator.

Definition at line 156 of file clebschgordan.h.

156  {
157  c_ -= 2;
158  return iterator(c_ + 2, parent_);
159  }
Here is the call graph for this function:

◆ operator==()

bool smash::I_tot_range::iterator::operator== ( const iterator other)
inline
Parameters
otherOther iterator.
Returns
Whether both iterators are equal.

Definition at line 164 of file clebschgordan.h.

164 { return c_ == other.c_; }

◆ operator!=()

bool smash::I_tot_range::iterator::operator!= ( const iterator other)
inline
Parameters
otherOther iterator.
Returns
Whether both iterators are not equal.

Definition at line 169 of file clebschgordan.h.

169 { return c_ != other.c_; }

Member Data Documentation

◆ c_

int smash::I_tot_range::iterator::c_
private

Element of the iterator.

Definition at line 136 of file clebschgordan.h.

◆ parent_

I_tot_range& smash::I_tot_range::iterator::parent_
private

Parent class giving the total isospin range.

Definition at line 138 of file clebschgordan.h.


The documentation for this class was generated from the following file:
smash::I_tot_range::iterator::parent_
I_tot_range & parent_
Parent class giving the total isospin range.
Definition: clebschgordan.h:138
smash::I_tot_range::iterator::c_
int c_
Element of the iterator.
Definition: clebschgordan.h:136
smash::I_tot_range::iterator::iterator
iterator(int start, I_tot_range &parent)
Construct an iterator.
Definition: clebschgordan.h:147