Katabatic - Routing Toolbox


List of all members | Classes | Public Member Functions | Protected Member Functions
BaseGrid Class Referenceabstract

Abstract Base Class for Irregular Grid. More...

Inheritance diagram for BaseGrid:
Inheritance graph
[legend]

Classes

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

Public Member Functions

void destroy ()
 
const BoxgetBoundingBox () 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 AxisgetXGrads () const
 
const AxisgetYGrads () 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()

BaseGrid ( const Box bb)
protected

Construct a new BaseGrid on area bb. Graduations, rows & columns are sets to zero.

Member Function Documentation

◆ destroy()

void destroy ( )
inline

The user-level destructor.

◆ getBoundingBox()

const Box & getBoundingBox ( ) const
inline

Returns: The grid bounding box.

◆ getColumns()

unsigned int getColumns ( ) const
inline

◆ getRows()

unsigned int getRows ( ) const
inline

Returns: The numbers of rows in the grid.

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

◆ getRawSize()

unsigned int getRawSize ( ) const
inline

Returns: The total number of elements in the grid (i.e. $ rows \times columns $)

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

◆ getIndex()

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:

\[ index = c + r \times columns \]

References BaseGrid::getColumns().

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

◆ getRow()

unsigned int getRow ( unsigned int  i) const
inline

An helper function that compute the row number from the linear index in the vector:

\[ row = index / columns \]

References BaseGrid::getColumns().

Referenced by GCell::getRow().

◆ getColumn()

unsigned int getColumn ( unsigned int  i) const
inline

An helper function that compute the column number from the linear index in the vector:

\[ column = index \div columns \]

References BaseGrid::getColumns().

Referenced by GCell::getColumn().

◆ getXGrads()

const Axis & getXGrads ( ) const
inline

Returns: The graduations on the X axis.

◆ getYGrads()

const Axis & getYGrads ( ) const
inline

Returns: The graduations on the Y axis.


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


Generated by doxygen 1.8.14 on Mon Feb 3 2020 Return to top of page
Katabatic - Routing Toolbox Copyright © 2008-2016 UPMC. All rights reserved