ARTS 2.5.4 (git: 4c0d3b4d)
ConstComplexIterator1D Class Reference

The constant iterator class for sub vectors. More...

#include <matpack_complex.h>

Public Member Functions

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

Private Attributes

const 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 constant iterator class for sub vectors.

This takes into account the defined stride.

Definition at line 240 of file matpack_complex.h.

Constructor & Destructor Documentation

◆ ConstComplexIterator1D() [1/2]

ConstComplexIterator1D::ConstComplexIterator1D ( )
default

Default constructor.

◆ ConstComplexIterator1D() [2/2]

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

Explicit constructor.

Definition at line 246 of file matpack_complex.h.

Member Function Documentation

◆ operator!=()

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

Not equal operator, needed for algorithms like copy.

Definition at line 261 of file matpack_complex.h.

References mx.

◆ operator*()

const Complex & ConstComplexIterator1D::operator* ( ) const
inline

Dereferencing.

Definition at line 258 of file matpack_complex.h.

References mx.

◆ operator++()

ConstComplexIterator1D & ConstComplexIterator1D::operator++ ( )
inline

Prefix increment operator.

Definition at line 252 of file matpack_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 479 of file matpack_complex.cc.

Member Data Documentation

◆ mstride

Index ConstComplexIterator1D::mstride {0}
private

Stride.

Definition at line 275 of file matpack_complex.h.

Referenced by operator++().

◆ mx

const Complex* ConstComplexIterator1D::mx {nullptr}
private

Current position.

Definition at line 273 of file matpack_complex.h.

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


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