ARTS  2.2.66
ConstIterator1D Class Reference

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

#include <matpackI.h>

Public Member Functions

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

Private Attributes

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

This takes into account the defined stride.

Definition at line 249 of file matpackI.h.

Constructor & Destructor Documentation

◆ ConstIterator1D() [1/2]

ConstIterator1D::ConstIterator1D ( )
inline

Default constructor.

Definition at line 252 of file matpackI.h.

◆ ConstIterator1D() [2/2]

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

Explicit constructor.

Definition at line 256 of file matpackI.h.

Member Function Documentation

◆ operator!=()

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

Not equal operator, needed for algorithms like copy.

Definition at line 268 of file matpackI.h.

References mx.

◆ operator*()

const Numeric& ConstIterator1D::operator* ( ) const
inline

Dereferencing.

Definition at line 265 of file matpackI.h.

References mx.

◆ operator++()

ConstIterator1D& ConstIterator1D::operator++ ( )
inline

Prefix increment operator.

Definition at line 261 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 ConstIterator1D::mstride
private

Stride.

Definition at line 278 of file matpackI.h.

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

◆ mx

const Numeric* ConstIterator1D::mx
private

Current position.

Definition at line 276 of file matpackI.h.

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


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