Cadabra Computer algebra system for field theory problems

Description

Representation of the index structure of a tensor monomial, using a storage format which resembles an adjacency matrix.

The structure is stored as a vector of integers. Negative integers denote free indices. Positive indices denote a contraction with an index at the indicated position.

Example:

A_{m n} B_{p n} -> -1 3 -2 1 0 1 2 3

The tensor names themselves ('A' and 'B' above) are not stored.

#include <Adjform.hh>

Public Types

using value_type = short
The maximal number of index slots is set by value_type: for a short, the maximal number of slots is 127. More...

using size_type = value_type

using difference_type = value_type

using array_type = std::vector< value_type >

using const_reference = array_type::const_reference

using const_iterator = array_type::const_iterator

Public Member Functions

template<typename IndexIterator >
Adjform (IndexIterator beg, IndexIterator end, IndexMap &index_map, const Kernel &kernel)

template<typename ValueIterator >
Adjform (ValueIterator beg, ValueIterator end, bool push_as_coordinates)

const_iterator begin () const

const_iterator end () const

size_type index_of (value_type index, size_type offset=0) const

bool operator< (const Adjform &other) const

bool operator== (const Adjform &other) const

bool operator!= (const Adjform &other) const

const_reference operator[] (size_type idx) const

size_type size () const

size_type max_size () const

bool empty () const

bool is_free_index (size_type pos) const

bool is_dummy_index (size_type pos) const

size_type n_free_indices () const

size_type n_dummy_indices () const

bool resolve_dummy (value_type value)

void push_index (value_type value)

void push_coordinate (value_type value)

void push (Ex::iterator iterator, IndexMap &index_map, const Kernel &kernel)

void swap (size_type a, size_type b)

void rotate (size_type n)

void sort ()

uint64_t to_lehmer_code () const

uint64_t max_lehmer_code () const

std::string to_string () const

array_type data

◆ value_type

The maximal number of index slots is set by value_type: for a short, the maximal number of slots is 127.

Constructor & Destructor Documentation

template<typename IndexIterator >

template<typename ValueIterator >

◆ index_of()

 Adjform::size_type cadabra::Adjform::index_of ( value_type index, size_type offset = 0 ) const

◆ push()

 void cadabra::Adjform::push ( Ex::iterator iterator, IndexMap & index_map, const Kernel & kernel )