Dune::Array< T > Class Template Reference
[Common]

#include <array.hh>

List of all members.


Detailed Description

template<class T>
class Dune::Array< T >

A simple dynamic array class.

Public Types

typedef T MemberType
 export base type of array

Public Member Functions

Iterator begin () const
 Return iterator refering to first element in array.
Iterator end () const
 Return iterator refering to one past the last element of the array.
 Array ()
 make empty array
 Array (int m)
 make array with m components
 Array (const Array< T > &)
 copy constructor making shallow copy
 ~Array ()
 destructor
Array< T > & operator= (const Array< T > &)
 assignment of two arrays
Array< T > & operator= (const T &a)
 assign value to all components
void resize (int m)
 reallocate array with size m
void realloc (int m)
void swap (Array< T > &copy)
 just for some tests
int size () const
 return number of components in array
void set (const T &v)
 Sets all entries to the same value.
T & operator[] (int i)
 random access operator
const T & operator[] (int i) const
 Const random access operator.
void print (int k, std::string s, std::string row)
 Print contents of the array to cout.
bool processXdr (XDR *xdrs)

Classes

class  Iterator
 An iterator to access all components of array. More...

Member Function Documentation

template<class T>
void Dune::Array< T >::realloc ( int  m  )  [inline]

Todo:
This the same as resize!

References Dune::Array< T >::resize().

template<class T>
void Dune::Array< T >::print ( int  k,
std::string  s,
std::string  row 
) [inline]

Print contents of the array to cout.

Parameters:
k Number of elements per printed row.
s Name of the array appearing in the first line.
row String being printed in each line.

template<class T>
bool Dune::Array< T >::processXdr ( XDR *  xdrs  )  [inline]

Todo:
Please doc me!

References Dune::Array< T >::resize().


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

Generated on 6 Nov 2008 with Doxygen (ver 1.5.6) [logfile].