Tomographer  v1.0a
Tomographer C++ Framework Documentation
Tomographer::MAT::DimList Class Reference

An array of ints which specifies a list of dimensions. More...

#include <tomographer/tools/ezmatio.h>

+ Inheritance diagram for Tomographer::MAT::DimList:
+ Collaboration diagram for Tomographer::MAT::DimList:

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...
 
DimListoperator<< (int dim)
 
DimListoperator<< (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.
 

Detailed Description

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.

Definition at line 314 of file ezmatio.h.

Member Function Documentation

bool Tomographer::MAT::DimList::matchesWanted ( const DimList wanted) const
inline

Test whether our dimensions match the given required list of dimensions.

Definition at line 350 of file ezmatio.h.

int Tomographer::MAT::DimList::ndims ( ) const
inline

Get the number of dimensions in this array.

This is simply an alias for std::vector<int>::size()

Definition at line 345 of file ezmatio.h.

int Tomographer::MAT::DimList::numel ( ) const
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().

Definition at line 338 of file ezmatio.h.


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