Documentation
IndexList is a sequence of "indices" (multicharacter labels) used to annotate modes of a miltidimensional tensor/array for the purpose of encoding an operation
Definition at line 107 of file index_list.h.
Public Types | |
| using | container_type = container::svector< std::string > |
| using | const_iterator = typename container_type::const_iterator |
Public Member Functions | |
| IndexList () | |
| Constructs an empty index list. More... | |
| IndexList (const std::string &str) | |
| constructs from a string More... | |
| template<typename InIter > | |
| IndexList (InIter first, InIter last) | |
| constructs from a range of index labels More... | |
| IndexList (const container_type &indices) | |
| constructs from a container of index labels More... | |
| IndexList (const IndexList &other) | |
| IndexList & | operator= (const IndexList &other) |
| IndexList & | operator= (const std::string &str) |
| IndexList & | operator*= (const Permutation &p) |
| operator bool () const | |
| Bool conversion. More... | |
| bool | operator! () const |
| Not operator. More... | |
| const_iterator | begin () const |
| Returns an iterator to the first index. More... | |
| const_iterator | end () const |
| Returns an iterator to the end of the index list. More... | |
| const std::string & | at (const std::size_t n) const |
| Returns the n-th index. More... | |
| const std::string & | operator[] (const std::size_t n) const |
| Returns the n-th index. More... | |
| unsigned int | dim () const |
| Returns the number of elements in the index list. More... | |
| unsigned int | size () const |
| Returns the number of elements in the index list. More... | |
| const auto & | data () const |
| std::string | string () const |
| comma-separated concatenator of indices More... | |
| void | swap (IndexList &other) |
| auto | count (const std::string &x) const |
| auto | positions (const std::string &x) const |
| template<typename V , typename = std::enable_if_t<TiledArray::detail::is_range_v<V>>> | |
| Permutation | permutation (const V &other) const |
| Computes permutation that converts an index list to this list. More... | |
| bool | is_permutation (const IndexList &other) const |
Check that this index list is a permutation of other. More... | |
Friends | |
| void | swap (IndexList &, IndexList &) |
| Exchange the content of the two index lists. More... | |
| IndexList | operator* (const ::TiledArray::Permutation &, const IndexList &) |
Member Typedef Documentation
◆ const_iterator
| using TiledArray::expressions::IndexList::const_iterator = typename container_type::const_iterator |
Definition at line 110 of file index_list.h.
◆ container_type
| using TiledArray::expressions::IndexList::container_type = container::svector<std::string> |
Definition at line 109 of file index_list.h.
Constructor & Destructor Documentation
◆ IndexList() [1/5]
|
inline |
Constructs an empty index list.
Definition at line 113 of file index_list.h.
◆ IndexList() [2/5]
|
inlineexplicit |
constructs from a string
- Parameters
-
str a string containing comma-separated index labels. All whitespaces are discarded, i.e., "a c" will be converted to "ac" and will be considered a single index.
Definition at line 120 of file index_list.h.
◆ IndexList() [3/5]
|
inline |
constructs from a range of index labels
- Template Parameters
-
InIter an input iterator dereferencing to std::string
- Parameters
-
first the begin iterator last the end iterator
- Note
- All whitespaces are discarded, i.e., "a c" will be converted to "ac" and will be considered a single index.
Definition at line 132 of file index_list.h.
◆ IndexList() [4/5]
|
inline |
constructs from a container of index labels
- Parameters
-
indices the index container
- Note
- All whitespaces are discarded, i.e., "a c" will be converted to "ac" and will be considered a single index.
Definition at line 145 of file index_list.h.
◆ IndexList() [5/5]
|
inline |
Definition at line 148 of file index_list.h.
Member Function Documentation
◆ at()
|
inline |
Returns the n-th index.
Definition at line 184 of file index_list.h.
◆ begin()
|
inline |
Returns an iterator to the first index.
Definition at line 178 of file index_list.h.

◆ count()
|
inline |
Returns the number of times index x appears in this instance
- Parameters
-
[in] x The index we are searching for.
- Returns
- the number of times
xappears in this object
Definition at line 220 of file index_list.h.

◆ data()
|
inline |
Definition at line 199 of file index_list.h.
◆ dim()
|
inline |
Returns the number of elements in the index list.
Definition at line 192 of file index_list.h.
◆ end()
|
inline |
Returns an iterator to the end of the index list.
Definition at line 181 of file index_list.h.

◆ is_permutation()
|
inline |
Check that this index list is a permutation of other.
- Returns
trueif all indices in this index list are inother, otherwisefalse.
Definition at line 254 of file index_list.h.


◆ operator bool()
|
inlineexplicit |
Bool conversion.
- Returns
trueif the permutation is not empty, otherwisefalse.
Definition at line 170 of file index_list.h.
◆ operator!()
|
inline |
Not operator.
- Returns
trueif the permutation is empty, otherwisefalse.
Definition at line 175 of file index_list.h.
◆ operator*=()
|
inline |
◆ operator=() [1/2]
Definition at line 150 of file index_list.h.
◆ operator=() [2/2]
|
inline |
Definition at line 156 of file index_list.h.
◆ operator[]()
|
inline |
Returns the n-th index.
Definition at line 187 of file index_list.h.
◆ permutation()
|
inline |
Computes permutation that converts an index list to this list.
The result of this function is a permutation that defines this=p^other .
- Template Parameters
-
V A range type
- Parameters
-
other An array that defines a index list
- Returns
pas defined by the above relationship
Definition at line 246 of file index_list.h.

◆ positions()
|
inline |
Returns the positions of x in this
- Parameters
-
[in] x The index we are looking for.
- Returns
- A random-access container whose length is the number of times that
xappears in the annotation and whose elements are the indices whose labels equalx.
Definition at line 230 of file index_list.h.

◆ size()
|
inline |
Returns the number of elements in the index list.
Definition at line 197 of file index_list.h.

◆ string()
|
inline |
comma-separated concatenator of indices
Definition at line 202 of file index_list.h.
◆ swap()
|
inline |
Friends And Related Function Documentation
◆ operator*
|
friend |
Definition at line 338 of file index_list.h.
◆ swap
Exchange the content of the two index lists.
Definition at line 325 of file index_list.h.
The documentation for this class was generated from the following file:
- TiledArray/expressions/index_list.h


1.8.20