16 #ifndef dealii_linear_index_iterator_h 17 #define dealii_linear_index_iterator_h 19 #include <deal.II/base/config.h> 21 #include <deal.II/base/exceptions.h> 24 DEAL_II_NAMESPACE_OPEN
140 template <
class DerivedIterator,
class AccessorType>
236 operator-(
const DerivedIterator &p)
const;
289 operator<(
const DerivedIterator &)
const;
296 operator>(
const DerivedIterator &)
const;
318 template <
class DerivedIterator,
class AccessorType>
319 inline DerivedIterator &
324 accessor.linear_index = it.linear_index;
325 return static_cast<DerivedIterator &
>(*this);
330 template <
class DerivedIterator,
class AccessorType>
331 inline DerivedIterator &
339 template <
class DerivedIterator,
class AccessorType>
340 inline DerivedIterator
343 const DerivedIterator copy(this->
accessor);
350 template <
class DerivedIterator,
class AccessorType>
351 inline DerivedIterator &
359 template <
class DerivedIterator,
class AccessorType>
360 inline DerivedIterator
363 const DerivedIterator copy(this->
accessor);
370 template <
class DerivedIterator,
class AccessorType>
371 inline DerivedIterator
375 DerivedIterator copy(this->
accessor);
382 template <
class DerivedIterator,
class AccessorType>
383 inline DerivedIterator
387 DerivedIterator copy(this->
accessor);
394 template <
class DerivedIterator,
class AccessorType>
395 inline DerivedIterator &
400 return static_cast<DerivedIterator &
>(*this);
405 template <
class DerivedIterator,
class AccessorType>
406 inline DerivedIterator &
415 template <
class DerivedIterator,
class AccessorType>
423 "Only iterators pointing to the same container can be compared."));
424 return this->
accessor.linear_index - other.accessor.linear_index;
429 template <
class DerivedIterator,
class AccessorType>
438 template <
class DerivedIterator,
class AccessorType>
447 template <
class DerivedIterator,
class AccessorType>
452 const auto &other_2 =
static_cast<decltype(*this) &
>(other);
453 return accessor.container == other_2.accessor.container &&
454 accessor.linear_index == other_2.accessor.linear_index;
459 template <
class DerivedIterator,
class AccessorType>
464 return !(*
this == other);
469 template <
class DerivedIterator,
class AccessorType>
474 return (*
this == other) || (*
this < other);
479 template <
class DerivedIterator,
class AccessorType>
484 return !(*
this < other);
489 template <
class DerivedIterator,
class AccessorType>
496 "Only iterators pointing to the same container can be compared."));
497 return this->
accessor.linear_index < other.accessor.linear_index;
502 template <
class DerivedIterator,
class AccessorType>
507 return other < *
this;
512 template <
class DerivedIterator,
class AccessorType>
519 DEAL_II_NAMESPACE_CLOSE
bool operator==(const DerivedIterator &) const
DerivedIterator & operator+=(const difference_type n)
bool operator>(const DerivedIterator &) const
std::ptrdiff_t difference_type
DerivedIterator & operator=(const DerivedIterator &it)
bool operator!=(const DerivedIterator &) const
bool operator>=(const DerivedIterator &) const
LinearIndexIterator()=default
Accessor< T, Constness > value_type
static::ExceptionBase & ExcMessage(std::string arg1)
DerivedIterator operator-(const difference_type n) const
reference operator*() const
#define Assert(cond, exc)
std::random_access_iterator_tag iterator_category
DerivedIterator operator+(const difference_type n) const
DerivedIterator & operator++()
DerivedIterator & operator-=(const difference_type n)
typename value_type::size_type size_type
DerivedIterator & operator--()
const value_type & reference
const value_type * pointer
bool operator<(const DerivedIterator &) const
pointer operator->() const
bool operator<=(const DerivedIterator &) const