Struct tensor::index_iterator

Nested Relationships

This struct is a nested type of Template Class tensor.

Inheritance Relationships

Base Type

  • public std::iterator< std::bidirectional_iterator_tag, IndexType >

Struct Documentation

struct gamer::tensor::index_iterator : public std::iterator<std::bidirectional_iterator_tag, IndexType>

Iterator over tensor indices.

Public Types

using super = std::iterator<std::bidirectional_iterator_tag, IndexType>

Public Functions

inline index_iterator(const index_iterator &iter)

Copy constructor.

Parameters

iter[in] The iterator to copy from

inline index_iterator(const index_iterator &&iter)

Move constructor.

Parameters

iter[in] The iterator to move from

inline index_iterator()

Constructor initialized at end of indices.

inline index_iterator(int)

Constructor initialized at start of indices.

inline index_iterator &operator++()

Prefix incrementation of the index.

Returns

Iterator to the next index

inline index_iterator operator++(int)

Postfix incrementation of the index.

Returns

Iterator to the next index

inline index_iterator &operator--()

Prefix decrementation of the index.

Returns

Iterator to the previous index

inline index_iterator operator--(int)

Postfix decrementation of the index.

Returns

Iterator to the previous index

inline bool operator==(index_iterator j) const

Equality operator for indices.

Parameters

j[in] Other index iterator to compare to

Returns

True if indices are equal

inline bool operator!=(index_iterator j) const

{ operator_description }

Parameters

j[in] { parameter_description }

Returns

{ description_of_the_return_value }

inline super::reference operator*()

Dereference the iterator.

Returns

Index array of indices

inline super::pointer operator->()

Dereference the iterator.

Returns

Index array of indices

Protected Attributes

IndexType i

Array of indices.