libgenua Basic Geometry, Numerical Algorithms and Interfaces
PointGrid< N, Type > Class Template Reference

## Detailed Description

### template<uint N, class Type = Real> class PointGrid< N, Type >

Points on a rectangular grid.

PointGrid organizes n-dimensional points in a rectangular grid (a point matrix). It is often used to represent structural mesh patches (of quadrilateral elements).

PointList

`#include <point.h>`

## Public Member Functions

PointGrid ()
default empty constructor

PointGrid (uint r, uint c)
sized construction

PointGrid (const PointGrid< N, Type > &src)
copy construction

PointGrid< N, Type > & operator= (const PointGrid< N, Type > &rhs)
assignment operator

bool operator== (const PointGrid< N, Type > &rhs) const
element equality

const Type * pointer () const
pointer to first element

Type * pointer ()
pointer to first element of first point

reference operator[] (uint i)
mutable linear access

const_reference operator[] (uint i) const
const linear access

reference operator() (uint i)
mutable linear access

const_reference operator() (uint i) const
const linear access

reference operator() (uint r, uint c)
mutable 2D access

const_reference operator() (uint r, uint c) const
const 2D access

uint nrows () const
row count

uint ncols () const
column count

uint size () const
total size

bool empty () const
check for content

void clear ()
clear content

void zero ()
reset to zero points

void resize (uint r, uint c)
set new size of memory block

const_iterator begin () const
start pointer

const_iterator end () const
one-past-end pointer

iterator begin ()
start pointer

iterator end ()
one-past-end pointer

void operator*= (Real f)
scale

void operator/= (Real f)
scale

const PointGrid< N, Type > & operator+= (const PointGrid< N, Type > &a)
offset

const PointGrid< N, Type > & operator-= (const PointGrid< N, Type > &a)
offset

PointGrid< N, Type > operator+ (const PointGrid< N, Type > &a)

PointGrid< N, Type > operator- (const PointGrid< N, Type > &a)
substract

XmlElement toXml () const
convert to xml representation

void fromXml (const XmlElement &xe)
read from xml representation

void swap (PointGrid< N, Type > &a)
swap pointers

## Private Attributes

uint rows
size

container data
storage

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