Class MASIter

Class Documentation

class MASIter

An iterator class for ModelArraySlices. Conforms to the forward iterator specifications.

Public Types

using iterator_category = std::forward_iterator_tag
using value_type = FloatType
using difference_type = std::ptrdiff_t
using pointer = FloatType*
using reference = FloatType&
using Slice = ArraySlicer::Slice
using SliceIter = ArraySlicer::SliceIter

Public Functions

MASIter(ModelArraySlice &mas)
inline FloatType &operator*() const

Provides read/write access to the data at the current location of the iterator.

Returns:

reference access to the data the iterator refers to.

inline MASIter &operator++()

Increments the position of the iterator.

inline bool operator!=(const MASIter &other) const

Checks if another iterator is no equal to this.

Parameters:

the – second iterator to compare.

Returns:

true when the two iterators are different.

inline bool operator==(const MASIter &other) const

Checks if another iterator is equal to this.

Parameters:

the – second iterator to compare

Returns:

true when the two iterators point to the same point of the same array.

inline FloatType *operator->() const

Provides member access for the data at the current location of the iterator.

Returns:

a pointer to the current data

inline MASIter operator++(int)

Post-increments the iterator.

Returns:

The state of the iterator before it was incremented.

inline std::ostream &print(std::ostream &os) const

Pretty-prints the current state of the iterator, including the address of the data array.

Public Members

friend ModelArraySlice