BIE::Frontier Class Reference

Used to represent a frontier in a tessellation tree. More...

#include <Frontier.h>

Inheritance diagram for BIE::Frontier:
Collaboration diagram for BIE::Frontier:

List of all members.

Public Member Functions

 Frontier (Tessellation *tess)
 Constructs a new Frontier object for the given tessellation.
 Frontier (const Frontier *)
 Copy constructor.
FrontierCopy ()
 Make a copy of myself.
 ~Frontier ()
 Destructor.
TessellationgetTessellation ()
 Returns the tessellation the frontier object applies to.
vector< int > ExportFrontier ()
 Returns a vector containing tileids of the tiles in the frontier.
void RetractToTopLevel ()
 Retract the frontier to the root nodes.
void UpDownLevels (int n)
 Expand or contract frontier by the specified number of levels.
void Set (vector< int > FrontierState)
 Sets the nodes/tiles in the frontier explicitly.
bool IncreaseResolution (FrontierExpansionHeuristic *heuristic, int numlevels=1)
 Increases the resolution of the frontier where recommended by a heuristic.
NodeFind (double x, double y)
 Find the frontier node with the given coordinates, or return NULL if the coordinates are not covered by the frontier.
int First (void)
 Frontier iterator function: returns the tileid of the first tile/node in the frontier.
int Last (void)
 Frontier iterator function: returns the tileid of the last tile/node in the frontier.
int Next (void)
 Frontier iterator function: returns the tileid of the next tile/node in the frontier, and advances the position of the cursor to this tile.
int CurrentItem (void)
 Frontier iterator function: returns the tileid of the tile/node currently pointed to by the cursor.
void Reset (void)
 Frontier iterator function: Resets the cursor to the first tile/node in the frontier.
bool IsDone (void)
 Returns true once Next() has returned the final tile/node in the frontier.
unsigned int Size ()
 Frontier size.
void printSize ()
 Print the frontier size to the console.
bool AccumulateMode ()
 Is frontier in accumulate mode?

Friends

class boost::serialization::access


Detailed Description

Used to represent a frontier in a tessellation tree.

which can be mutated based on user supplied functions or heuristics

There are two frontier modes: accumulated mode and normal mode. In accumulated mode, the active tree is the entire tree upto and including the frontier. This choice is relevant for point sets with no clear spatial extent. In normal mode, the active tree is the frontier itself. Normally, the tessellation is exclusive so the tesselation denoted by the frontier is the entire space


Constructor & Destructor Documentation

BIE::Frontier::Frontier ( Tessellation tess  ) 

Constructs a new Frontier object for the given tessellation.

The frontier is initially set to be the set of root nodes in the tessellation.


Member Function Documentation

Tessellation* BIE::Frontier::getTessellation (  )  [inline]

Returns the tessellation the frontier object applies to.

Each frontier is associated with one (and only one) tessellation.

void BIE::Frontier::UpDownLevels ( int  n  ) 

Expand or contract frontier by the specified number of levels.

Parameters:
n Number of levels to expand (positive N) or contract (negative N).

void BIE::Frontier::Set ( vector< int >  FrontierState  ) 

Sets the nodes/tiles in the frontier explicitly.

Nodes that are decended from another node in the frontier state are excluded (i.e. the most general tiles get preference). This doesn't just naively set the frontier since we risk invalid frontiers (e.g. a parent and child tile both in frontier), but recurses through the tree (so can be expensive).

Parameters:
FrontierState The new frontier specified as a vector of tile IDs.

bool BIE::Frontier::IncreaseResolution ( FrontierExpansionHeuristic heuristic,
int  numlevels = 1 
)

Increases the resolution of the frontier where recommended by a heuristic.

See the description of FrontierExpansionHeuristic and its subclasses for details of possible heuristics.

Parameters:
heuristic An expansion heuristic.
numlevels Number of levels to skip during expansion. Increases the resolution of the frontier where recommended by a heuristic. See the description of FrontierExpansionHeuristic and its subclasses or details of possible heuristics.
param heuristic An expansion heuristic.

Node* BIE::Frontier::Find ( double  x,
double  y 
)

Find the frontier node with the given coordinates, or return NULL if the coordinates are not covered by the frontier.

int BIE::Frontier::First ( void   )  [inline]

Frontier iterator function: returns the tileid of the first tile/node in the frontier.

int BIE::Frontier::Last ( void   )  [inline]

Frontier iterator function: returns the tileid of the last tile/node in the frontier.

int BIE::Frontier::Next ( void   ) 

Frontier iterator function: returns the tileid of the next tile/node in the frontier, and advances the position of the cursor to this tile.

Returns the last tileid continually when the end is reached.

int BIE::Frontier::CurrentItem ( void   ) 

Frontier iterator function: returns the tileid of the tile/node currently pointed to by the cursor.

void BIE::Frontier::Reset ( void   )  [inline]

Frontier iterator function: Resets the cursor to the first tile/node in the frontier.

bool BIE::Frontier::IsDone ( void   )  [inline]

Returns true once Next() has returned the final tile/node in the frontier.


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

Send suggestions, questions, and feedback to WEINBERG at ASTRO dot UMASS dot EDU.
Documentation generated at Fri Mar 26 00:35:12 2010 by doxygen