ARTS  2.2.66
Iterator1D Class Reference

The iterator class for sub vectors. More...

#include <matpackI.h>

Public Member Functions

 Iterator1D ()
 Default constructor. More...
 
 Iterator1D (Numeric *x, Index stride)
 Explicit constructor. More...
 
Iterator1Doperator++ ()
 Prefix increment operator. More...
 
Numericoperator* () const
 Dereferencing. More...
 
bool operator!= (const Iterator1D &other) const
 Not equal operator, needed for algorithms like copy. More...
 

Private Attributes

Numericmx
 Current position. More...
 
Index mstride
 Stride. More...
 

Friends

void copy (ConstIterator1D origin, const ConstIterator1D &end, Iterator1D 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 214 of file matpackI.h.

Constructor & Destructor Documentation

◆ Iterator1D() [1/2]

Iterator1D::Iterator1D ( )
inline

Default constructor.

Definition at line 217 of file matpackI.h.

◆ Iterator1D() [2/2]

Iterator1D::Iterator1D ( Numeric x,
Index  stride 
)
inline

Explicit constructor.

Definition at line 220 of file matpackI.h.

Member Function Documentation

◆ operator!=()

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

Not equal operator, needed for algorithms like copy.

Definition at line 233 of file matpackI.h.

References mx.

◆ operator*()

Numeric& Iterator1D::operator* ( ) const
inline

Dereferencing.

Definition at line 230 of file matpackI.h.

References mx.

◆ operator++()

Iterator1D& Iterator1D::operator++ ( )
inline

Prefix increment operator.

Definition at line 226 of file matpackI.h.

References mstride, and mx.

Friends And Related Function Documentation

◆ copy

void copy ( ConstIterator1D  origin,
const ConstIterator1D end,
Iterator1D  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 612 of file matpackI.cc.

Member Data Documentation

◆ mstride

Index Iterator1D::mstride
private

Stride.

Definition at line 244 of file matpackI.h.

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

◆ mx

Numeric* Iterator1D::mx
private

Current position.

Definition at line 242 of file matpackI.h.

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


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