StructuredGrid< N, M, T > Class Template Reference

Class for a structured grid. More...

#include <StructuredGrid.h>

List of all members.

Public Types

typedef T Number
 The number type.
typedef ads::FixedArray< M,
Number
Point
 The point type.
typedef ads::Array< N, PointArray
 The array of points.
typedef BBox< N, NumberBBox
 A bounding box.
typedef Array::value_type Value
 The element type of the grid is a point.
typedef Array::pointer Pointer
 A pointer to a grid element.
typedef Array::const_pointer ConstPointer
 A pointer to a constant grid element.
typedef Array::iterator Iterator
 An iterator on points.
typedef Array::const_iterator ConstIterator
 A const iterator on points.
typedef Array::reference Reference
 A reference to a point.
typedef Array::const_reference ConstReference
 A const reference to a point.
typedef Array::size_type SizeType
 The size type.
typedef Array::difference_type DifferenceType
 Pointer difference type.
typedef Array::index_type Index
 A multi-index. Index in N dimensions.

Public Member Functions

Constructors etc.

 StructuredGrid ()
 Default constructor. Empty grid.
template<bool A>
 StructuredGrid (const ads::Array< N, Point, A > &grid)
 Construct from an array of points.
 StructuredGrid (const Index &extents)
 Construct from the grid extents.
 StructuredGrid (const StructuredGrid &other)
 Copy constructor.
StructuredGridoperator= (const StructuredGrid &other)
 Assignment operator.
 ~StructuredGrid ()
 Destructor. Free allocated memory.
Mathematical Functions

BBox computeBBox () const
 Make a bounding box containing the points in the grid.
Manipulators

Iterator getBeginning ()
 Return an iterator to the beginning of the points.
Iterator getEnd ()
 Return an iterator to the end of the points.
Reference operator() (const Index &mi)
 Return a reference to the given point.
ConstReference operator() (const int i, const int j)
 Return a reference to the given point.
ConstReference operator() (const int i, const int j, const int k)
 Return a reference to the given point.
Equality

bool isEqualTo (const StructuredGrid &x) const
 Return true if the grid is equal to the argument.
File I/O

void put (std::ostream &out) const
 Write in ascii format.
void get (std::istream &in)
 Read in ascii format.
void writeIndexedSimplexSet (std::ostream &out) const
 Write as an indexed simplex set.

Related Functions

(Note that these are not member functions.)



template<int N, int M, typename T >
std::ostream & operator<< (std::ostream &out, const StructuredGrid< N, M, T > &x)
 Write a grid in ascii format.
template<int N, int M, typename T >
std::istream & operator>> (std::istream &in, StructuredGrid< N, M, T > &x)
 Read a grid in ascii format.
template<int N, int M, typename T >
bool operator== (const StructuredGrid< N, M, T > &a, const StructuredGrid< N, M, T > &b)
 Return true if the grids are equal.
template<int N, int M, typename T >
bool operator!= (const StructuredGrid< N, M, T > &a, const StructuredGrid< N, M, T > &b)
 Return true if the grids are not equal.

Accessors



const IndexgetExtents () const
 Return the grid extents.
SizeType getSize () const
 Return the number of grid points.
ConstIterator getBeginning () const
 Return a const iterator to the beginning of the points.
ConstIterator getEnd () const
 Return a const iterator to the end of the points.
const ArraygetGrid () const
 Return a const reference to the grid array.
ConstReference operator() (const Index &mi) const
 Return a const reference to the given point.
ConstReference operator() (const int i, const int j) const
 Return a const reference to the given point.
ConstReference operator() (const int i, const int j, const int k) const
 Return a const reference to the given point.
static int getSpaceDimension ()
 Return the dimension of the space.
static int getGridDimension ()
 Return the dimension of the grid.

Detailed Description

template<int N, int M, typename T = double>
class StructuredGrid< N, M, T >

Class for a structured grid.

Parameters:
N is the space dimension.
M is the grid dimension.
T is the number type. By default it is double.

A structured grid is an N-dimensional array of M-dimensional points.


Constructor & Destructor Documentation

template<int N, int M, typename T = double>
template<bool A>
StructuredGrid< N, M, T >::StructuredGrid ( const ads::Array< N, Point, A > &  grid  )  [inline]

Construct from an array of points.

Parameters:
grid is the array of points.
template<int N, int M, typename T = double>
StructuredGrid< N, M, T >::StructuredGrid ( const Index extents  )  [inline]

Construct from the grid extents.

Parameters:
extents are the grid extents.

Friends And Related Function Documentation

template<int N, int M, typename T >
bool operator!= ( const StructuredGrid< N, M, T > &  a,
const StructuredGrid< N, M, T > &  b 
) [related]

Return true if the grids are not equal.

template<int N, int M, typename T >
std::ostream & operator<< ( std::ostream &  out,
const StructuredGrid< N, M, T > &  x 
) [related]

Write a grid in ascii format.

template<int N, int M, typename T >
bool operator== ( const StructuredGrid< N, M, T > &  a,
const StructuredGrid< N, M, T > &  b 
) [related]

Return true if the grids are equal.

References StructuredGrid< N, M, T >::isEqualTo().

template<int N, int M, typename T >
std::istream & operator>> ( std::istream &  in,
StructuredGrid< N, M, T > &  x 
) [related]

Read a grid in ascii format.

References StructuredGrid< N, M, T >::get().


The documentation for this class was generated from the following file:
Generated on Thu Jun 30 02:14:59 2016 for Computational Geometry Package by  doxygen 1.6.3