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 index_iterator : public std::iterator<std::bidirectional_iterator_tag, IndexType>

Iterator over tensor indices.

Public Types

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

Public Functions

template<>
index_iterator(const index_iterator &iter)

Copy constructor.

Parameters
  • [in] iter: The iterator to copy from

template<>
index_iterator(const index_iterator &&iter)

Move constructor.

Parameters
  • [in] iter: The iterator to move from

template<>
index_iterator()

Constructor initialized at end of indices.

template<>
index_iterator(int)

Constructor initialized at start of indices.

template<>
index_iterator &operator++()

Prefix incrementation of the index.

Return

Iterator to the next index

template<>
index_iterator operator++(int)

Postfix incrementation of the index.

Return

Iterator to the next index

template<>
index_iterator &operator--()

Prefix decrementation of the index.

Return

Iterator to the previous index

template<>
index_iterator operator--(int)

Postfix decrementation of the index.

Return

Iterator to the previous index

template<>
bool operator==(index_iterator j) const

Equality operator for indices.

Return

True if indices are equal

Parameters
  • [in] j: Other index iterator to compare to

template<>
bool operator!=(index_iterator j) const

{ operator_description }

Return

{ description_of_the_return_value }

Parameters
  • [in] j: { parameter_description }

template<>
super::reference operator*()

Dereference the iterator.

Return

Index array of indices

template<>
super::pointer operator->()

Dereference the iterator.

Return

Index array of indices

Protected Attributes

template<>
IndexType i

Array of indices.