ARTS  2.4.0(git:4fb77825)
ComplexIterator1D Class Reference

The iterator class for sub vectors. More...

#include <complex.h>

Public Member Functions

 ComplexIterator1D ()=default
 Default constructor. More...
 
 ComplexIterator1D (Complex *x, Index stride)
 Explicit constructor. More...
 
ComplexIterator1Doperator++ ()
 Prefix increment operator. More...
 
Complexoperator* () const
 Dereferencing. More...
 
bool operator!= (const ComplexIterator1D &other) const
 Not equal operator, needed for algorithms like copy. More...
 

Private Attributes

Complexmx {nullptr}
 Current position. More...
 
Index mstride {0}
 Stride. More...
 

Friends

void copy (ConstComplexIterator1D origin, const ConstComplexIterator1D &end, ComplexIterator1D target)
 Copy data between begin and end to target. More...
 

Detailed Description

The iterator class for sub vectors.

This takes into account the defined stride.

Definition at line 176 of file complex.h.

Constructor & Destructor Documentation

◆ ComplexIterator1D() [1/2]

ComplexIterator1D::ComplexIterator1D ( )
default

Default constructor.

◆ ComplexIterator1D() [2/2]

ComplexIterator1D::ComplexIterator1D ( Complex x,
Index  stride 
)
inline

Explicit constructor.

Definition at line 182 of file complex.h.

Member Function Documentation

◆ operator!=()

bool ComplexIterator1D::operator!= ( const ComplexIterator1D other) const
inline

Not equal operator, needed for algorithms like copy.

Definition at line 198 of file complex.h.

References mx.

◆ operator*()

Complex& ComplexIterator1D::operator* ( ) const
inline

Dereferencing.

Definition at line 195 of file complex.h.

References mx.

◆ operator++()

ComplexIterator1D& ComplexIterator1D::operator++ ( )
inline

Prefix increment operator.

Definition at line 189 of file complex.h.

References mstride, and mx.

Friends And Related Function Documentation

◆ copy

void copy ( ConstComplexIterator1D  origin,
const ConstComplexIterator1D end,
ComplexIterator1D  target 
)
friend

Copy data between begin and end to target.

Target must be a valid area of memory. Note that the strides in the iterators can be different, so that we can for example copy data between different kinds of subvectors.

Definition at line 478 of file complex.cc.

Member Data Documentation

◆ mstride

Index ComplexIterator1D::mstride {0}
private

Stride.

Definition at line 213 of file complex.h.

Referenced by copy(), and operator++().

◆ mx

Complex* ComplexIterator1D::mx {nullptr}
private

Current position.

Definition at line 211 of file complex.h.

Referenced by copy(), operator!=(), operator*(), and operator++().


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