BIE::Tessellation Class Reference

An immutable tessellation of tiles, possibly hierarchical. More...

#include <Tessellation.h>

Inheritance diagram for BIE::Tessellation:
Collaboration diagram for BIE::Tessellation:

List of all members.

Public Member Functions

 Tessellation ()
 Default blank constructor.
virtual ~Tessellation ()
 Destructor.
virtual TileGetTile (int tileid)
 Retrieve a tile given a tileid.
virtual void FindAll (double x, double y, vector< int > &found)
 Find all tiles in the tessellation tree with the given coordinates.
virtual vector< int > GetRootTiles ()=0
 Return the tile ids of the tree roots in the tessellation forest.
virtual vector< Node * > GetRootNodes ()=0
 Return the roots of the trees in the tessellation forest.
virtual bool IsValidTileID (int tileid)
 Returns true if the tile id is valid for this tessellation.
virtual int MinID ()
 Returns the lowest tile ID used by the tessellation.
virtual int MaxID ()
 Returns the highest tile ID used by the tessellation.
virtual int NumberTiles ()
 Returns the total number of tiles in this tessellation.
void PrintPreOrder (vector< Node * > rootnodes, ostream &outputstream)
 Print the trees underneath the provided root nodes in pre-order.
void PrintPreOrder (ostream &outputstream)
 Print the tessellation tree in pre-order.
void GetLimits (double &x1, double &x2, double &y1, double &y2)
 Get map limits.

Protected Member Functions

void PrintPreOrder (Node *tree, ostream &outputstream)
 Prints out the tessellation tree to standard output.
void findall (double, double, vector< int > &, Node *)
 Find all children of a node containing the given coordinates.
void compute_sampling (RecordInputStream *, vector< twodcoords > *, double pts, double minx, double maxx, double miny, double maxy)
 Samples a specified percentage of the input stream, and puts the sample points into a vector.

Protected Attributes

double Xmin
 These define the boundary of the tessellation.
double Xmax
double Ymin
double Ymax
map< int, Tile * > _tiles
 Tileid indexed list of tiles.
int Ntiles
 Total number of tiles.
compx compX
 Compares the x values in two twodcoords structures.
compy compY
 Compares the y values in two twodcoords structures.

Friends

class boost::serialization::access

Classes

struct  compx
 Compares the x values in two twodcoords structures. More...
struct  compxy
 Compares both x and y values in two twodcoords structures for equality. More...
struct  compy
 Compares the y values in two twodcoords structures. More...
struct  hashCoords
 Hash a twodcoords struct into a single integer by Xoring the bits! More...


Detailed Description

An immutable tessellation of tiles, possibly hierarchical.

Member Function Documentation

virtual vector<int> BIE::Tessellation::GetRootTiles (  )  [pure virtual]

Return the tile ids of the tree roots in the tessellation forest.

QuadTree and Kd have forests with size one. All MappedGrid are "root" nodes.

Implemented in BIE::BinaryTessellation, BIE::ContainerTessellation, BIE::CursorTessellation, BIE::KdTessellation, BIE::MappedGrid, BIE::PointTessellation, BIE::QuadGrid, and BIE::UniversalTessellation.

virtual vector<Node*> BIE::Tessellation::GetRootNodes (  )  [pure virtual]

Return the roots of the trees in the tessellation forest.

QuadTree and Kd have forests with size one.

Implemented in BIE::BinaryTessellation, BIE::ContainerTessellation, BIE::CursorTessellation, BIE::KdTessellation, BIE::MappedGrid, BIE::PointTessellation, BIE::QuadGrid, and BIE::UniversalTessellation.

virtual int BIE::Tessellation::MaxID (  )  [inline, virtual]

Returns the highest tile ID used by the tessellation.

We really need an iterator for all tile ids.

Here is the call graph for this function:

void BIE::Tessellation::PrintPreOrder ( vector< Node * >  rootnodes,
ostream &  outputstream 
)

Print the trees underneath the provided root nodes in pre-order.

void BIE::Tessellation::compute_sampling ( RecordInputStream ,
vector< twodcoords > *  ,
double  pts,
double  minx,
double  maxx,
double  miny,
double  maxy 
) [protected]

Samples a specified percentage of the input stream, and puts the sample points into a vector.


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:13 2010 by doxygen