# 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:
[legend]

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

## 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()

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

Returns: The numbers of columns in the grid.

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

## ◆ 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. )

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:

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:

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:

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:

- Grid.h
- Grid.cpp
- Grid.dox

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