Aboria

PrevUpHomeNext

Class template linked_list_iterator

Aboria::linked_list_iterator

Synopsis

// In header: </home/travis/build/martinjrobins/Aboria/src/NeighbourSearchBase.h>

template<typename Traits> 
class linked_list_iterator {
public:
  // types
  typedef Traits                    traits_type;      
  typedef const p_pointer           pointer;          
  typedef std::forward_iterator_tag iterator_category;
  typedef const p_reference         reference;        
  typedef const p_reference         value_type;       
  typedef std::ptrdiff_t            difference_type;  

  // construct/copy/destruct
  linked_list_iterator();
  linked_list_iterator(const int, const p_pointer &, int *const);
  linked_list_iterator(const linked_list_iterator &);
  linked_list_iterator& operator=(const linked_list_iterator &);

  // public member functions
  size_t distance_to_end() const;
  reference operator*() const;
  reference operator->();
  linked_list_iterator & operator++();
  linked_list_iterator operator++(int);
  linked_list_iterator operator+(int);
  size_t operator-(linked_list_iterator) const;
  bool operator==(const linked_list_iterator &) const;
  bool operator!=(const linked_list_iterator &) const;
  bool operator==(const bool) const;
  bool operator!=(const bool) const;

  // private member functions
  bool increment();
  bool equal(linked_list_iterator const &) const;
  bool equal(const bool) const;
  reference dereference() const;
};

Description

A const iterator to a set of neighbouring points. This iterator implements a STL forward iterator type

linked_list_iterator public construct/copy/destruct

  1. linked_list_iterator();
  2. linked_list_iterator(const int index, const p_pointer & particles_begin, 
                         int *const linked_list_begin);

    this constructor is used to start the iterator at the head of a bucket list

  3. linked_list_iterator(const linked_list_iterator & other);
  4. linked_list_iterator& operator=(const linked_list_iterator & other);

linked_list_iterator public member functions

  1. size_t distance_to_end() const;
  2. reference operator*() const;
  3. reference operator->();
  4. linked_list_iterator & operator++();
  5. linked_list_iterator operator++(int);
  6. linked_list_iterator operator+(int n);
  7. size_t operator-(linked_list_iterator start) const;
  8. bool operator==(const linked_list_iterator & rhs) const;
  9. bool operator!=(const linked_list_iterator & rhs) const;
  10. bool operator==(const bool rhs) const;
  11. bool operator!=(const bool rhs) const;

linked_list_iterator private member functions

  1. bool increment();
  2. bool equal(linked_list_iterator const & other) const;
  3. bool equal(const bool other) const;
  4. reference dereference() const;

PrevUpHomeNext