Tomographer
v1.0a
Tomographer C++ Framework Documentation
|
An array of ints which specifies a list of dimensions. More...
#include <tomographer/tools/ezmatio.h>
Public Member Functions | |
template<typename VectorType > | |
DimList (VectorType &&dims) | |
template<typename T , ENABLED_IF(std::is_convertible< T) int> | |
::value | DimList (std::initializer_list< T > init) |
template<class It > | |
DimList (It b, It e) | |
int | numel () const |
Get the total number of elements in an array of these dimensions. More... | |
int | ndims () const |
Get the number of dimensions in this array. More... | |
bool | matchesWanted (const DimList &wanted) const |
Test whether our dimensions match the given required list of dimensions. More... | |
DimList & | operator<< (int dim) |
DimList & | operator<< (const std::vector< int > &moredims) |
Public Member Functions inherited from std::vector< int > | |
int | push_back (int...args) |
int | crbegin (int...args) |
int | erase (int...args) |
int | data (int...args) |
int | insert (int...args) |
int | pop_back (int...args) |
int | shrink_to_fit (int...args) |
int | back (int...args) |
int | end (int...args) |
int | resize (int...args) |
int | emplace_back (int...args) |
int | size (int...args) |
int | cbegin (int...args) |
int | front (int...args) |
int | ~vector (int...args) |
int | rbegin (int...args) |
int | crend (int...args) |
int | assign (int...args) |
int | operator= (int...args) |
int | vector (int...args) |
int | reserve (int...args) |
int | capacity (int...args) |
int | empty (int...args) |
int | cend (int...args) |
int | swap (int...args) |
int | max_size (int...args) |
int | rend (int...args) |
int | get_allocator (int...args) |
int | clear (int...args) |
int | at (int...args) |
int | emplace (int...args) |
int | operator[] (int...args) |
int | begin (int...args) |
Additional Inherited Members | |
Public Attributes inherited from std::vector< int > | |
int | elements |
STL member. | |
An array of ints which specifies a list of dimensions.
This utility may be used to specify a list of dimensions for a N-D array. It is a subclass of std::vector<int>, and implements some additional functions such as numel(), matchesWanted() and operator<<.
You may also use operator<<(int) and operator<<(const DimList&) to append dimensions to the list.
|
inline |
|
inline |
Get the number of dimensions in this array.
This is simply an alias for std::vector<int>::size()
|
inline |
Get the total number of elements in an array of these dimensions.
This is simply the product of all elements in the array. See get_numel().