concepts::MultiArray< 1, T > Class Template Reference
Container typename for multidimensional Array which is based on std::map. More...
#include <multiArray.hh>
Classes | |
class | Scanner |
Class for scanning (iterating) over the array in all dimensions. More... | |
Public Member Functions | |
void | clear () |
Clears the array. More... | |
void | erase (const uint i[1]) |
Erase entry i . More... | |
void | erase (uint i) |
void | erase_last () |
bool | isElm (const uint i) const |
bool | isElm (const uint i[1]) const |
Checks if the element exists. More... | |
MultiArray (bool commutable=false) | |
Constructor. More... | |
T & | operator[] (const uint i) |
Index operator for the container. More... | |
const T & | operator[] (const uint i) const |
Index operator for the container. More... | |
T & | operator[] (const uint i[1]) |
Index operator for the container. More... | |
const T & | operator[] (const uint i[1]) const |
Index operator for the container. More... | |
Scanner * | scan () const |
Scanner over the entrances. More... | |
uint | size () const |
Number of entrances. More... | |
~MultiArray () | |
Protected Member Functions | |
virtual std::ostream & | info (std::ostream &os) const |
Returns information in an output stream. More... | |
Private Attributes | |
std::map< uint, T > | data_ |
array of T More... | |
Detailed Description
template<typename T>
class concepts::MultiArray< 1, T >
Container typename for multidimensional Array which is based on std::map.
First level, 1-dimensional array
Definition at line 445 of file multiArray.hh.
Constructor & Destructor Documentation
◆ MultiArray()
|
inline |
Constructor.
Commutability for one-dimensional array not important, its here for the recursive definition.
Definition at line 481 of file multiArray.hh.
◆ ~MultiArray()
|
inline |
Definition at line 485 of file multiArray.hh.
Member Function Documentation
◆ clear()
|
inline |
Clears the array.
Definition at line 534 of file multiArray.hh.
◆ erase() [1/2]
|
inline |
Erase entry i
.
Definition at line 520 of file multiArray.hh.
◆ erase() [2/2]
|
inline |
Definition at line 521 of file multiArray.hh.
◆ erase_last()
|
inline |
Definition at line 525 of file multiArray.hh.
◆ info()
|
protectedvirtual |
Returns information in an output stream.
Reimplemented from concepts::OutputOperator.
Definition at line 557 of file multiArray.hh.
◆ isElm() [1/2]
bool concepts::MultiArray< 1, T >::isElm | ( | const uint | i | ) | const |
Definition at line 551 of file multiArray.hh.
◆ isElm() [2/2]
|
inline |
Checks if the element exists.
Definition at line 516 of file multiArray.hh.
◆ operator[]() [1/4]
|
inline |
Index operator for the container.
If an item is not existing, it is created, inserted into the array and then returned.
- Returns
- The i-th element of the array.
Definition at line 506 of file multiArray.hh.
◆ operator[]() [2/4]
const T & concepts::MultiArray< 1, T >::operator[] | ( | const uint | i | ) | const |
Index operator for the container.
- Returns
- The i-th element of the array.
Definition at line 543 of file multiArray.hh.
◆ operator[]() [3/4]
|
inline |
Index operator for the container.
If an item is not existing, it is created, inserted into the array and then returned.
- Returns
- The (i[0])th element of the array.
Definition at line 493 of file multiArray.hh.
◆ operator[]() [4/4]
|
inline |
Index operator for the container.
- Returns
- The (i[0])th element of the array.
Definition at line 498 of file multiArray.hh.
◆ scan()
|
inline |
Scanner over the entrances.
Definition at line 513 of file multiArray.hh.
◆ size()
|
inline |
Number of entrances.
Definition at line 531 of file multiArray.hh.
Member Data Documentation
◆ data_
|
private |
array of T
Definition at line 539 of file multiArray.hh.
The documentation for this class was generated from the following file:
- toolbox/multiArray.hh