ug4
ug::FixedArray2< T, rowsT, colsT, T_ordering > Class Template Reference

#include <fixed_array.h>

+ Inheritance diagram for ug::FixedArray2< T, rowsT, colsT, T_ordering >:

Public Types

enum  { is_static =true }
 
enum  { static_num_rows =rowsT }
 
enum  { static_num_cols =colsT }
 
typedef size_t size_type
 
typedef static_type storage_type
 
typedef T value_type
 

Public Member Functions

T & at (size_type r, size_type c)
 
const T & at (size_type r, size_type c) const
 
size_type capacity_num_cols () const
 
size_type capacity_num_rows () const
 
bool empty () const
 
 FixedArray2 ()
 
 FixedArray2 (const FixedArray2< T, rowsT, colsT, T_ordering > &other)
 
 FixedArray2 (size_type rows, size_type cols)
 
size_type num_cols () const
 
size_type num_rows () const
 
T & operator() (size_type r, size_type c)
 
const T & operator() (size_type r, size_type c) const
 
bool reserve (size_type nrRows, size_type nrCols) const
 
bool resize (size_type newRows, size_type newCols, bool bCopyValues=true)
 
 ~FixedArray2 ()
 

Static Public Attributes

static const eMatrixOrdering ordering = T_ordering
 

Protected Attributes

values [rowsT *colsT]
 

Friends

template<typename a , size_type b, size_type c, eMatrixOrdering d>
std::ostream & operator<< (std::ostream &out, const FixedArray2< a, b, c, d > &arr)
 

Detailed Description

template<typename T, size_t rowsT, size_t colsT, eMatrixOrdering T_ordering = ColMajor>
class ug::FixedArray2< T, rowsT, colsT, T_ordering >

FixedArray2 is a two-dimensional array which supports a similar interface like stl::vector. You can use FixedArray2 in GeMatrix to get a fixed size Matrix. Use is_static to distinguish between fixed and variable arrays.

Parameters
Ttype of object in Array (i.e. double)
colsTfixed number of columns
rowsTfixed number of rows
T_orderingOrdering of columns/rows. Default is ColMajor.
See also
eMatrixOrdering

Member Typedef Documentation

◆ size_type

template<typename T , size_t rowsT, size_t colsT, eMatrixOrdering T_ordering = ColMajor>
typedef size_t ug::FixedArray2< T, rowsT, colsT, T_ordering >::size_type

◆ storage_type

template<typename T , size_t rowsT, size_t colsT, eMatrixOrdering T_ordering = ColMajor>
typedef static_type ug::FixedArray2< T, rowsT, colsT, T_ordering >::storage_type

◆ value_type

template<typename T , size_t rowsT, size_t colsT, eMatrixOrdering T_ordering = ColMajor>
typedef T ug::FixedArray2< T, rowsT, colsT, T_ordering >::value_type

Member Enumeration Documentation

◆ anonymous enum

template<typename T , size_t rowsT, size_t colsT, eMatrixOrdering T_ordering = ColMajor>
anonymous enum
Enumerator
is_static 

◆ anonymous enum

template<typename T , size_t rowsT, size_t colsT, eMatrixOrdering T_ordering = ColMajor>
anonymous enum
Enumerator
static_num_rows 

◆ anonymous enum

template<typename T , size_t rowsT, size_t colsT, eMatrixOrdering T_ordering = ColMajor>
anonymous enum
Enumerator
static_num_cols 

Constructor & Destructor Documentation

◆ FixedArray2() [1/3]

template<typename T , size_t rowsT, size_t colsT, eMatrixOrdering T_ordering>
ug::FixedArray2< T, rowsT, colsT, T_ordering >::FixedArray2

◆ FixedArray2() [2/3]

template<typename T , size_t rowsT, size_t colsT, eMatrixOrdering T_ordering>
ug::FixedArray2< T, rowsT, colsT, T_ordering >::FixedArray2 ( size_type  rows,
size_type  cols 
)

◆ FixedArray2() [3/3]

template<typename T , size_t rowsT, size_t colsT, eMatrixOrdering T_ordering>
ug::FixedArray2< T, rowsT, colsT, T_ordering >::FixedArray2 ( const FixedArray2< T, rowsT, colsT, T_ordering > &  other)

◆ ~FixedArray2()

template<typename T , size_t rowsT, size_t colsT, eMatrixOrdering T_ordering>
ug::FixedArray2< T, rowsT, colsT, T_ordering >::~FixedArray2

Member Function Documentation

◆ at() [1/2]

template<typename T , size_t rowsT, size_t colsT, eMatrixOrdering T_ordering = ColMajor>
T& ug::FixedArray2< T, rowsT, colsT, T_ordering >::at ( size_type  r,
size_type  c 
)
inline

◆ at() [2/2]

template<typename T , size_t rowsT, size_t colsT, eMatrixOrdering T_ordering = ColMajor>
const T& ug::FixedArray2< T, rowsT, colsT, T_ordering >::at ( size_type  r,
size_type  c 
) const
inline

◆ capacity_num_cols()

template<typename T , size_t rowsT, size_t colsT, eMatrixOrdering T_ordering = ColMajor>
size_type ug::FixedArray2< T, rowsT, colsT, T_ordering >::capacity_num_cols ( ) const
inline

◆ capacity_num_rows()

template<typename T , size_t rowsT, size_t colsT, eMatrixOrdering T_ordering = ColMajor>
size_type ug::FixedArray2< T, rowsT, colsT, T_ordering >::capacity_num_rows ( ) const
inline

◆ empty()

template<typename T , size_t rowsT, size_t colsT, eMatrixOrdering T_ordering = ColMajor>
bool ug::FixedArray2< T, rowsT, colsT, T_ordering >::empty ( ) const
inline

◆ num_cols()

template<typename T , size_t rowsT, size_t colsT, eMatrixOrdering T_ordering>
size_t ug::FixedArray2< T, rowsT, colsT, T_ordering >::num_cols
inline

Referenced by ug::operator<<().

◆ num_rows()

template<typename T , size_t rowsT, size_t colsT, eMatrixOrdering T_ordering>
size_t ug::FixedArray2< T, rowsT, colsT, T_ordering >::num_rows
inline

Referenced by ug::operator<<().

◆ operator()() [1/2]

template<typename T , size_t rowsT, size_t colsT, eMatrixOrdering T_ordering>
T & ug::FixedArray2< T, rowsT, colsT, T_ordering >::operator() ( size_type  r,
size_type  c 
)
inline

References ug::RowMajor.

◆ operator()() [2/2]

template<typename T , size_t rowsT, size_t colsT, eMatrixOrdering T_ordering>
const T & ug::FixedArray2< T, rowsT, colsT, T_ordering >::operator() ( size_type  r,
size_type  c 
) const
inline

◆ reserve()

template<typename T , size_t rowsT, size_t colsT, eMatrixOrdering T_ordering = ColMajor>
bool ug::FixedArray2< T, rowsT, colsT, T_ordering >::reserve ( size_type  nrRows,
size_type  nrCols 
) const
inline

◆ resize()

template<typename T , size_t rowsT, size_t colsT, eMatrixOrdering T_ordering>
bool ug::FixedArray2< T, rowsT, colsT, T_ordering >::resize ( size_type  newRows,
size_type  newCols,
bool  bCopyValues = true 
)
inline

Friends And Related Function Documentation

◆ operator<<

template<typename T , size_t rowsT, size_t colsT, eMatrixOrdering T_ordering = ColMajor>
template<typename a , size_type b, size_type c, eMatrixOrdering d>
std::ostream& operator<< ( std::ostream &  out,
const FixedArray2< a, b, c, d > &  arr 
)
friend

Member Data Documentation

◆ ordering

template<typename T , size_t rowsT, size_t colsT, eMatrixOrdering T_ordering = ColMajor>
const eMatrixOrdering ug::FixedArray2< T, rowsT, colsT, T_ordering >::ordering = T_ordering
static

◆ values

template<typename T , size_t rowsT, size_t colsT, eMatrixOrdering T_ordering = ColMajor>
T ug::FixedArray2< T, rowsT, colsT, T_ordering >::values[rowsT *colsT]
protected

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