Cadabra
Computer algebra system for field theory problems
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  }
Storage.hh
cadabra::index_iterator
Definition: IndexIterator.hh:16
cadabra::index_iterator::properties
const Properties * properties
Definition: IndexIterator.hh:35
cadabra::index_iterator::index_iterator
index_iterator(const Properties &)
Definition: IndexIterator.cc:7
cadabra::index_iterator::operator==
bool operator==(const index_iterator &) const
Definition: IndexIterator.cc:37
cadabra::index_iterator::create
static index_iterator create(const Properties &, const iterator_base &)
Definition: IndexIterator.cc:12
cadabra::index_iterator::end
static index_iterator end(const Properties &, const iterator_base &)
Definition: IndexIterator.cc:130
cadabra::index_iterator::walk
Ex::iterator walk
Definition: IndexIterator.hh:33
cadabra::index_iterator::operator=
index_iterator & operator=(const index_iterator &)
Definition: IndexIterator.cc:138
cadabra::index_iterator::halt
Ex::iterator halt
Definition: IndexIterator.hh:33
cadabra::index_iterator::operator++
index_iterator & operator++()
Definition: IndexIterator.cc:84
cadabra::index_iterator::operator+=
index_iterator & operator+=(unsigned int)
Definition: IndexIterator.cc:74
cadabra::index_iterator::operator!=
bool operator!=(const index_iterator &) const
Definition: IndexIterator.cc:31
cadabra::index_iterator::begin
static index_iterator begin(const Properties &, const iterator_base &, int offset=0)
Definition: IndexIterator.cc:122
cadabra
Functions to handle the exchange properties of two or more symbols in a product.
Definition: Adjform.cc:80
cadabra::index_iterator::roof
Ex::iterator roof
Definition: IndexIterator.hh:33
Props.hh
cadabra::Properties
Definition: Props.hh:233
cadabra::index_iterator::is_index
bool is_index(Ex::iterator) const