BaseGrid(3)

NAME
BaseGrid - Abstract Base Class for Irregular Grid.

SYNOPSIS

Inherited by Grid< GCell >, and Grid< GCellT >.

  Classes
class Axis
Graduations on a BaseGrid Axis (H or V).

  Public Member Functions
void destroy ()
const Box & getBoundingBox () const
unsigned int getColumns () const
unsigned int getRows () const
unsigned int getRawSize () const
unsigned int getIndex (unsigned int c, unsigned int r) const
unsigned int getRow (unsigned int) const
unsigned int getColumn (unsigned int) const
const Axis & getXGrads () const
const Axis & getYGrads () const

  Protected Member Functions
BaseGrid (const Box &)

Detailed Description

Abstract Base Class for Irregular Grid. An abstract class for a 2-D matrix of objects. The grid is irregular in the sense that the horizontal and vertical cut lines may not be evenly spaced.

The coordinates of cut lines in horizontal and vertical direction are stored BaseGrid::Axis structure.

The BaseGrid contains all the non-template methods of the Grid, that is that do not depend of the matrix element type.

The internal storage implemented in derived classes is expected to store 'row by row' (rows are put one after another in the vector).

Constructor & Destructor Documentation

  BaseGrid (const Box & bb) [protected]
Construct a new BaseGrid on area bb. Graduations, rows & columns are sets to zero.

Member Function Documentation

  void destroy () [inline]
The user-level destructor.

  const Box & getBoundingBox () const [inline]
Returns: The grid bounding box.

  unsigned int getColumns () const [inline]
Returns: The numbers of columns in the grid.

Referenced by GCellGrid::_postCreate(), KatabaticEngine::createDetailedGrid(), BaseGrid::getColumn(), BaseGrid::getIndex(), BaseGrid::getRawSize(), and BaseGrid::getRow().

  unsigned int getRows () const [inline]
Returns: The numbers of rows in the grid.

Referenced by GCellGrid::_postCreate(), KatabaticEngine::createDetailedGrid(), and BaseGrid::getRawSize().

  unsigned int getRawSize () const [inline]
Returns: The total number of elements in the grid (i.e. $ rows imes columns $)

References BaseGrid::getColumns(), and BaseGrid::getRows().

  unsigned int getIndex (unsigned int c, unsigned int r) const [inline]
An helper function that compute the linear index in the element vector from a (c,r) coordinate pair:

References BaseGrid::getColumns().

Referenced by Grid< GCell >::getGCellDown(), Grid< GCell >::getGCellLeft(), Grid< GCell >::getGCellRight(), and Grid< GCell >::getGCellUp().

  unsigned int getRow (unsigned int i) const [inline]
An helper function that compute the row number from the linear index in the vector:

References BaseGrid::getColumns().

Referenced by GCell::getRow().

  unsigned int getColumn (unsigned int i) const [inline]
An helper function that compute the column number from the linear index in the vector:

References BaseGrid::getColumns().

Referenced by GCell::getColumn().

  const Axis & getXGrads () const [inline]
Returns: The graduations on the X axis.

  const Axis & getYGrads () const [inline]
Returns: The graduations on the Y axis.

Author

Generated automatically by Doxygen for Katabatic - Routing Toolbox from the source code.