Class GridBoxList implements a linked list of GridBox. More...
#include <GridBoxList.h>
Public Member Functions | |
GridBoxList () | |
Constructors. | |
GridBoxList (const unsigned int maxnum) | |
GridBoxList (const void *package, const unsigned int size, const int n) | |
GridBoxList (const GridBoxList &other) | |
GridBoxList & | operator= (const GridBoxList &) |
Assignment operator. | |
~GridBoxList (void) | |
The destructor. | |
GridBoxList * | alias () |
For the object counter. | |
int | difference (GridBoxList &gbl, const GridBox &lhs, const GridBox &rhs) |
Breaks a GridBox lhs against GridBox rhs and adds the pieces not contained in rhs to the GridBoxList. | |
int | intersection (GridBoxList &gbl, const GridBox &lhs, const GridBox &rhs) |
Adds the intersection of the lhs and rhs GridBox objects to the GridBoxList. | |
void | operator-= (const GridBoxList &rhs) |
Difference operator for GBL = retain only those regions that are not in rhs. | |
void | operator*= (const GridBoxList &rhs) |
Intersection operator for GBL = retain only those regions that are common. | |
void | intersect (const BBox &rhs, GridBoxList &gbl) |
GBL intersection with a BBox & BBoxList. | |
void | intersect (const BBox &rhs, GridBoxList &gbl, const int olap, const int extgh=0) |
void | intersect (const BBoxList &rhs, GridBoxList &gbl, const int olap, const int extgh=0) |
void | intersect (const BBox &rhs, GridBoxList &gbl, const short *olap, const int extgh=0) |
void | intersect (const BBoxList &rhs, GridBoxList &gbl, const short *olap, const int extgh=0) |
int | maxindex (void) |
Returns the max value of index in the list. | |
int | index (const BBox &bbv) |
Finds the index in the list which intersects with bb. | |
const GridBox & | find (const BBox &bb) |
Finds a particular GridBox in the list. | |
void | setindex (void) |
Set list stats. | |
void | setowner (const int p) |
void | bboxlist (BBoxList &bbl, const int olap) |
Get the corresponding BBoxList. | |
void | bboxlist (BBoxList &bbl, const short *olap, const int extgh) |
Class GridBoxList implements a linked list of GridBox.
Routines to manipulate this list are provided. The topology of each level is stored in various GridBoxLists.
GridBoxList::GridBoxList | ( | ) | [inline] |
Constructors.
GridBoxList::GridBoxList | ( | const unsigned int | maxnum | ) | [inline, explicit] |
GridBoxList::GridBoxList | ( | const void * | package, | |
const unsigned int | size, | |||
const int | n | |||
) | [inline] |
GridBoxList::GridBoxList | ( | const GridBoxList & | other | ) | [inline] |
GridBoxList::~GridBoxList | ( | void | ) | [inline] |
The destructor.
GridBoxList* GridBoxList::alias | ( | ) | [inline] |
For the object counter.
Reimplemented from ObjectCounter.
void GridBoxList::bboxlist | ( | BBoxList & | bbl, | |
const short * | olap, | |||
const int | extgh | |||
) |
void GridBoxList::bboxlist | ( | BBoxList & | bbl, | |
const int | olap | |||
) |
Get the corresponding BBoxList.
References Bucket< Type >::add(), Bucket< Type >::empty(), Bucket< GridBox >::first(), GridBox::gbBBox(), Bucket< Type >::isempty(), and Bucket< GridBox >::next().
Referenced by GridHierarchy::DAGH_RecomposeHierarchy().
int GridBoxList::difference | ( | GridBoxList & | gbl, | |
const GridBox & | lhs, | |||
const GridBox & | rhs | |||
) |
Breaks a GridBox lhs against GridBox rhs and adds the pieces not contained in rhs to the GridBoxList.
References DAGHFalse, DAGHTrue, GridBox::gbBBox(), Bucket< Type >::insert(), BBox::intersects(), BBox::lower(), Bucket< Type >::prev(), BBox::rank, BBox::stepsize(), and BBox::upper().
Referenced by operator-=().
Finds a particular GridBox in the list.
References Bucket< GridBox >::currec(), Bucket< GridBox >::first(), GridBox::gbBBox(), Bucket< GridBox >::next(), and Bucket< GridBox >::setcurrec().
int GridBoxList::index | ( | const BBox & | bbv | ) |
Finds the index in the list which intersects with bb.
References Bucket< GridBox >::currec(), DAGHFalse, Bucket< GridBox >::first(), GridBox::gbBBox(), GridBox::gbIndex(), Bucket< GridBox >::next(), and Bucket< GridBox >::setcurrec().
Referenced by GridBox::gbIndex(), GridBox::gbSetIndex(), GridBox::operator=(), GridBox::operator==(), and GridBox::SetGridBox().
void GridBoxList::intersect | ( | const BBoxList & | rhs, | |
GridBoxList & | gbl, | |||
const short * | olap, | |||
const int | extgh = 0 | |||
) |
References Bucket< Type >::add(), Bucket< Type >::currec(), BBox::empty(), Bucket< Type >::empty(), Bucket< Type >::first(), Bucket< GridBox >::first(), GridBox::gbBBox(), BBox::intersects(), Bucket< Type >::isempty(), Bucket< Type >::next(), Bucket< GridBox >::next(), and Bucket< Type >::setcurrec().
void GridBoxList::intersect | ( | const BBox & | rhs, | |
GridBoxList & | gbl, | |||
const short * | olap, | |||
const int | extgh = 0 | |||
) |
void GridBoxList::intersect | ( | const BBoxList & | rhs, | |
GridBoxList & | gbl, | |||
const int | olap, | |||
const int | extgh = 0 | |||
) |
References Bucket< Type >::add(), Bucket< Type >::currec(), BBox::empty(), Bucket< Type >::empty(), Bucket< Type >::first(), Bucket< GridBox >::first(), GridBox::gbBBox(), BBox::intersects(), Bucket< Type >::isempty(), Bucket< Type >::next(), Bucket< GridBox >::next(), and Bucket< Type >::setcurrec().
void GridBoxList::intersect | ( | const BBox & | rhs, | |
GridBoxList & | gbl, | |||
const int | olap, | |||
const int | extgh = 0 | |||
) |
void GridBoxList::intersect | ( | const BBox & | rhs, | |
GridBoxList & | gbl | |||
) |
GBL intersection with a BBox & BBoxList.
References Bucket< Type >::add(), BBox::empty(), Bucket< Type >::empty(), Bucket< GridBox >::first(), GridBox::gbBBox(), Bucket< Type >::isempty(), and Bucket< GridBox >::next().
Referenced by operator*=().
int GridBoxList::intersection | ( | GridBoxList & | gbl, | |
const GridBox & | lhs, | |||
const GridBox & | rhs | |||
) |
Adds the intersection of the lhs and rhs GridBox objects to the GridBoxList.
References DAGHFalse, DAGHTrue, GridBox::gbBBox(), Bucket< Type >::insert(), BBox::intersects(), Bucket< Type >::next(), and Bucket< Type >::prev().
Referenced by operator*=().
int GridBoxList::maxindex | ( | void | ) |
Returns the max value of index in the list.
References Bucket< GridBox >::currec(), Bucket< GridBox >::first(), Bucket< GridBox >::next(), and Bucket< GridBox >::setcurrec().
void GridBoxList::operator*= | ( | const GridBoxList & | rhs | ) |
Intersection operator for GBL = retain only those regions that are common.
References Bucket< Type >::currec(), Bucket< Type >::first(), intersect(), intersection(), Bucket< Type >::next(), Bucket< Type >::remove(), and Bucket< Type >::setcurrec().
void GridBoxList::operator-= | ( | const GridBoxList & | rhs | ) |
Difference operator for GBL = retain only those regions that are not in rhs.
References Bucket< Type >::currec(), difference(), Bucket< Type >::first(), Bucket< Type >::next(), Bucket< Type >::remove(), and Bucket< Type >::setcurrec().
GridBoxList & GridBoxList::operator= | ( | const GridBoxList & | cother | ) |
void GridBoxList::setindex | ( | void | ) | [inline] |
Set list stats.
References Bucket< GridBox >::first(), and Bucket< GridBox >::next().
void GridBoxList::setowner | ( | const int | p | ) | [inline] |
References Bucket< GridBox >::first(), and Bucket< GridBox >::next().