Cadabra
Computer algebra system for field theory problems
Public Types | Public Member Functions | Public Attributes | Private Attributes | List of all members
MultiIndex< T > Class Template Reference

Description

template<class T>
class MultiIndex< T >

A class to help iterating over all values of multiple objects.

Templated over the type of the values. See test_multiindex.cc for a sample use case.

#include <MultiIndex.hh>

Public Types

typedef std::vector< T > values_type
 

Public Member Functions

void start ()
 
bool end () const
 
MultiIndexoperator++ ()
 
const T & operator[] (std::size_t i)
 

Public Attributes

std::vector< values_typevalues
 

Private Attributes

std::vector< std::size_t > current_pos
 
bool end_
 

Member Typedef Documentation

◆ values_type

template<class T >
typedef std::vector<T> MultiIndex< T >::values_type

Member Function Documentation

◆ end()

template<class T >
bool MultiIndex< T >::end ( ) const
inline

◆ operator++()

template<class T >
MultiIndex& MultiIndex< T >::operator++ ( )
inline

◆ operator[]()

template<class T >
const T& MultiIndex< T >::operator[] ( std::size_t  i)
inline

◆ start()

template<class T >
void MultiIndex< T >::start ( )
inline

Member Data Documentation

◆ current_pos

template<class T >
std::vector<std::size_t> MultiIndex< T >::current_pos
private

◆ end_

template<class T >
bool MultiIndex< T >::end_
private

◆ values

template<class T >
std::vector<values_type> MultiIndex< T >::values

The documentation for this class was generated from the following file: