TBTK
TBTK::ArrayManager< T > Class Template Reference

#include <ArrayManager.h>

Static Public Member Functions

static void * create (const Index &ranges)
 
static void * create (const Index &ranges, T fill)
 
static void destroy (void *array, const Index &ranges)
 
static T * flatten (void *array, const Index &ranges)
 
static void * unflatten (T *array, const Index &ranges)
 
static void print (void *array, const Index &ranges)
 

Detailed Description

template<typename T>
class TBTK::ArrayManager< T >

A static class providing methods for manipulation of arrays. The class is intended to provide methods that simplifies the creation and manipulation of multi-dimensional arrays for non-critical applications. However, the arrays are not optimal for heavy calculations, and algorithms critically dependent on the size and access time of the arrays should not use the ArrayManager or arrays returned from it.

Member Function Documentation

template<typename T >
void * TBTK::ArrayManager< T >::create ( const Index ranges)
static

Allocate uninitialized array.

template<typename T >
void * TBTK::ArrayManager< T >::create ( const Index ranges,
fill 
)
static

Allocate initialized array.

template<typename T >
void TBTK::ArrayManager< T >::destroy ( void *  array,
const Index ranges 
)
static

Deallocate array.

template<typename T >
T * TBTK::ArrayManager< T >::flatten ( void *  array,
const Index ranges 
)
static

Flatten multi-dimensional array.

template<typename T >
void TBTK::ArrayManager< T >::print ( void *  array,
const Index ranges 
)
static

Print array.

template<typename T >
void * TBTK::ArrayManager< T >::unflatten ( T *  array,
const Index ranges 
)
static

Create multi-dimensional array from one-dimensional array.


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