Cadabra
Computer algebra system for field theory problems
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
IndexIterator.hh
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include "Storage.hh"
5 #include "Props.hh"
6 
7 namespace cadabra {
8 
15 
16 class index_iterator : public Ex::iterator_base {
17  public:
18  index_iterator(const Properties&);
20 
21  static index_iterator create(const Properties&, const iterator_base&);
22 
23  static index_iterator begin(const Properties&, const iterator_base&, int offset=0);
24  static index_iterator end(const Properties&, const iterator_base&);
25 
27  bool operator==(const index_iterator&) const;
28  bool operator!=(const index_iterator&) const;
31  index_iterator& operator+=(unsigned int);
32 
33  Ex::iterator halt, walk, roof;
34  private:
36 
37  bool is_index(Ex::iterator) const;
38 };
39 
40 //size_t number_of_indices(const Properties&, Ex::iterator);
41 
42 }
index_iterator & operator++()
Definition: IndexIterator.cc:84
static index_iterator create(const Properties &, const iterator_base &)
Definition: IndexIterator.cc:12
static index_iterator begin(const Properties &, const iterator_base &, int offset=0)
Definition: IndexIterator.cc:122
Ex::iterator roof
Definition: IndexIterator.hh:33
bool is_index(Ex::iterator) const
An iterator which iterates over indices even if they are at lower levels, i.e.
Definition: IndexIterator.hh:16
Ex::iterator walk
Definition: IndexIterator.hh:33
bool operator==(const index_iterator &) const
Definition: IndexIterator.cc:37
index_iterator & operator+=(unsigned int)
Definition: IndexIterator.cc:74
index_iterator & operator=(const index_iterator &)
Definition: IndexIterator.cc:138
static index_iterator end(const Properties &, const iterator_base &)
Definition: IndexIterator.cc:130
const Properties * properties
Definition: IndexIterator.hh:35
index_iterator(const Properties &)
Definition: IndexIterator.cc:7
bool operator!=(const index_iterator &) const
Definition: IndexIterator.cc:31
Class holding a collection of properties attached to expressions.
Definition: Props.hh:203
Ex::iterator halt
Definition: IndexIterator.hh:33