FreePOOMA  2.4.1
Public Types | Public Member Functions
Grid< Dim > Class Template Reference

Grid<N> is a domain representing a set of N numeric sequences, one for each dimension N. More...

#include <Grid.h>

Inheritance diagram for Grid< Dim >:
Inheritance graph
[legend]
Collaboration diagram for Grid< Dim >:
Collaboration graph
[legend]

List of all members.

Public Types

enum  { domain = DT_t::domain }
enum  { dimensions = DT_t::dimensions, sliceDimensions = DT_t::sliceDimensions }
enum  { loopAware = DT_t::loopAware }
enum  { singleValued = DT_t::singleValued }
enum  { unitStride = DT_t::unitStride }
enum  { wildcard = DT_t::wildcard }
typedef Base_t::iterator iterator
typedef Base_t::const_iterator const_iterator
 Iterator typedefs.
typedef Base_t::blockIterator blockIterator
typedef Base_t::const_blockIterator const_blockIterator
 Block iterator typedefs.
typedef DT_t::Element_t Element_t
typedef DT_t::Domain_t Domain_t
typedef DT_t::OneDomain_t OneDomain_t
typedef DT_t::BlockDomain_t BlockDomain_t
typedef DT_t::AskDomain_t AskDomain_t
typedef DT_t::AddResult_t AddResult_t
typedef DT_t::MultResult_t MultResult_t
typedef DT_t::Storage_t Storage_t

Public Member Functions

 Grid ()
 Grid (const Grid< Dim > &a)
template<class T1 >
 Grid (const T1 &a)
template<class T1 , class T2 >
 Grid (const T1 &a, const T2 &b)
template<class T1 , class T2 , class T3 >
 Grid (const T1 &a, const T2 &b, const T3 &c)
template<class T1 , class T2 , class T3 , class T4 >
 Grid (const T1 &a, const T2 &b, const T3 &c, const T4 &d)
template<class T1 , class T2 , class T3 , class T4 , class T5 >
 Grid (const T1 &a, const T2 &b, const T3 &c, const T4 &d, const T5 &e)
template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 >
 Grid (const T1 &a, const T2 &b, const T3 &c, const T4 &d, const T5 &e, const T6 &f)
template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 >
 Grid (const T1 &a, const T2 &b, const T3 &c, const T4 &d, const T5 &e, const T6 &f, const T7 &g)
 ~Grid ()
template<class T >
Grid< Dim > & operator= (const T &newdom)
Grid< Dim > & operator= (const Grid< Dim > &newdom)
template<class Out >
void print (Out &o) const
 print a Grid<N> to a stream, in the format "[" value1,value2,...,valueN "]"

Detailed Description

template<int Dim>
class Grid< Dim >

Grid<N> is a domain representing a set of N numeric sequences, one for each dimension N.

The sequences are lists of ascending or descending numbers, but without any fixed stride - the list for each dimension is an IndirectionList<int>.

You can construct a Grid object using other domain objects. The constructors accept up to 7 domain objects of various types. Domain types are, for example, Loc, Grid, Interval. int may also be used in the constructor for Grid; it acts like a Loc<1> object in that context. The domain arguments for the Grid constructors are combined together to form a single domain object with a dimension equal to the sum of the argument's dimensions; for example, if you try to create a Grid<3> from a Loc<2> and an Interval<1>, e.g. Grid<3> a(Loc<2>(1,2), Interval<1>(3,5)); the Loc<2> and Interval arguments are combined into a (2+1=3) dimensional domain object, used to initialize the Grid<3>. The number of dimensions for the arguments must be <= number of dimensions of the newly constructed Grid.

Grid, unlike other domain objects, can also be constructed with IndirectionList objects. IndirectionList's look like 1D domain objects to the constructor of Grid, so multiple lists can be used. Grid's can also be used in this same way to construct other Grid's.

For Grid<1>, the list of constructors includes the following:

The default Grid<1> constructor initializes the Grid to be empty, that is, to have a length() of zero. In that case, the endpoints are undefined, as is any operation involving the Grid.

In addition to the constructors, Grid has the following public interface, similar to all domain objects. There are two classes of interface methods, one class which includes methods which any Grid<N> object has, regardless of dimensions, the other class which includes extra interface methods that are available for just Grid<1> objects.

Grid<N> interface:

Grid<1> interface: all of the methods for Grid<N> are also available for Grid<1>. Plus:

For the special case of Grid<1>, there is a specialization given after the general case that has different constructors.

Grid inherits much of its activity from Domain<DomainTraits<Grid>>


Member Typedef Documentation

template<int Dim>
typedef Base_t::iterator Grid< Dim >::iterator
template<int Dim>
typedef Base_t::const_iterator Grid< Dim >::const_iterator

Iterator typedefs.

An N-dimensional iterator is a forward iterator, it works only with operator++ (it does not have operator--).

Reimplemented from Domain< Dim, DomainTraits< Grid< Dim > > >.

template<int Dim>
typedef Base_t::blockIterator Grid< Dim >::blockIterator
template<int Dim>
typedef Base_t::const_blockIterator Grid< Dim >::const_blockIterator

Block iterator typedefs.

All domains use the DomainBlockIterator class to iterate through blocks defined by the domain points. A block iterator is a forward iterator, it works only with operator++.

Reimplemented from Domain< Dim, DomainTraits< Grid< Dim > > >.

template<int Dim>
typedef DT_t::Element_t Grid< Dim >::Element_t
template<int Dim>
typedef DT_t::Domain_t Grid< Dim >::Domain_t
template<int Dim>
typedef DT_t::OneDomain_t Grid< Dim >::OneDomain_t
template<int Dim>
typedef DT_t::BlockDomain_t Grid< Dim >::BlockDomain_t
template<int Dim>
typedef DT_t::AskDomain_t Grid< Dim >::AskDomain_t
template<int Dim>
typedef DT_t::AddResult_t Grid< Dim >::AddResult_t
template<int Dim>
typedef DT_t::MultResult_t Grid< Dim >::MultResult_t
template<int Dim>
typedef DT_t::Storage_t Grid< Dim >::Storage_t

Member Enumeration Documentation

template<int Dim>
anonymous enum
Enumerator:
domain 
template<int Dim>
anonymous enum
Enumerator:
dimensions 
sliceDimensions 
template<int Dim>
anonymous enum
Enumerator:
loopAware 
template<int Dim>
anonymous enum
Enumerator:
singleValued 
template<int Dim>
anonymous enum
Enumerator:
unitStride 
template<int Dim>
anonymous enum
Enumerator:
wildcard 

Constructor & Destructor Documentation

template<int Dim>
Grid< Dim >::Grid ( ) [inline]
template<int Dim>
Grid< Dim >::Grid ( const Grid< Dim > &  a) [inline]
template<int Dim>
template<class T1 >
Grid< Dim >::Grid ( const T1 &  a) [inline, explicit]
template<int Dim>
template<class T1 , class T2 >
Grid< Dim >::Grid ( const T1 &  a,
const T2 &  b 
) [inline]
template<int Dim>
template<class T1 , class T2 , class T3 >
Grid< Dim >::Grid ( const T1 &  a,
const T2 &  b,
const T3 &  c 
) [inline]
template<int Dim>
template<class T1 , class T2 , class T3 , class T4 >
Grid< Dim >::Grid ( const T1 &  a,
const T2 &  b,
const T3 &  c,
const T4 &  d 
) [inline]
template<int Dim>
template<class T1 , class T2 , class T3 , class T4 , class T5 >
Grid< Dim >::Grid ( const T1 &  a,
const T2 &  b,
const T3 &  c,
const T4 &  d,
const T5 &  e 
) [inline]
template<int Dim>
template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 >
Grid< Dim >::Grid ( const T1 &  a,
const T2 &  b,
const T3 &  c,
const T4 &  d,
const T5 &  e,
const T6 &  f 
) [inline]
template<int Dim>
template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 >
Grid< Dim >::Grid ( const T1 &  a,
const T2 &  b,
const T3 &  c,
const T4 &  d,
const T5 &  e,
const T6 &  f,
const T7 &  g 
) [inline]
template<int Dim>
Grid< Dim >::~Grid ( ) [inline]

Member Function Documentation

template<int Dim>
template<class T >
Grid<Dim>& Grid< Dim >::operator= ( const T &  newdom) [inline]
template<int Dim>
Grid<Dim>& Grid< Dim >::operator= ( const Grid< Dim > &  newdom) [inline]
template<int Dim>
template<class Out >
void Grid< Dim >::print ( Out &  o) const

print a Grid<N> to a stream, in the format "[" value1,value2,...,valueN "]"

Reimplemented from DomainBase< DomainTraits< Grid< Dim > > >.


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