|
INTRODUCTION
Overview
Download and Install
Quick Start
Documentation
Publications
NONFRAMEWORK CODE
Driver Interfaces
Drivers
Libraries
Utilities
FRAMEWORK CODE
Interfaces
Components
Libraries
Utilities
Full Software Listings
DEVELOPER
Tutorials
Examples
Dev Guide
Dashboard
PEOPLE
Contributors
Users
Project
Download
Mailing lists
|
|
|
hydropathplan::Cell2D Class Reference
A light weight 2d cell reference containing a x and y index.
More...
#include <cell2d.h>
List of all members.
Public Member Functions |
int | x () const |
| get x index of cell
|
int | y () const |
| get y index of cell
|
void | setX (const int x) |
| set x index of cell
|
void | setY (const int y) |
| set y index of cell
|
void | set (const int x, const int y) |
| set both indeces of cell
|
Cell2D & | operator= (const Cell2D &p) |
| arithmetic operator
|
Cell2D & | operator+= (const Cell2D &) |
| arithmetic operator
|
Cell2D & | operator-= (const Cell2D &) |
| arithmetic operator
|
Cell2D & | operator*= (int) |
| arithmetic operator
|
Cell2D & | operator/= (int) |
| arithmetic operator, if division by zero, returns same cell
|
Friends |
bool | operator== (const Cell2D &, const Cell2D &) |
| arithmetic operator
|
bool | operator!= (const Cell2D &, const Cell2D &) |
| arithmetic operator
|
const Cell2D | operator+ (const Cell2D &, const Cell2D &) |
| arithmetic operator
|
const Cell2D | operator- (const Cell2D &, const Cell2D &) |
| arithmetic operator
|
const Cell2D | operator* (const Cell2D &, int) |
| arithmetic operator
|
const Cell2D | operator* (int, const Cell2D &) |
| arithmetic operator
|
const Cell2D | operator- (const Cell2D &) |
| arithmetic operator
|
Related Functions |
(Note that these are not member functions.)
|
double | euclideanDistance (const Cell2D c1, const Cell2D c2) |
int | manhattanDistance (const Cell2D c1, const Cell2D c2) |
bool | isAdjacentN (const Cell2D c1, const Cell2D c2, unsigned int N) |
bool | isNull (const Cell2D c) |
Cell2D | adjacentCell (const Cell2D &cell, const int i) |
Cell2D | diagonalCell (const Cell2D &cell, const int i) |
Cell2D | surroundCell (const Cell2D &cell, const int i) |
std::ostream & | operator<< (std::ostream &s, const Cell2D &obj) |
Detailed Description
A light weight 2d cell reference containing a x and y index.
Friends And Related Function Documentation
Cell2D adjacentCell |
( |
const Cell2D & |
cell, |
|
|
const int |
i | |
|
) |
| | [related] |
Returns a cell that is adjacent to the supplied cell. index goes from 0 -> 3, if outside this range, 0 is assumed. if the cell is on the edge behaviour is undefined.
Cell2D diagonalCell |
( |
const Cell2D & |
cell, |
|
|
const int |
i | |
|
) |
| | [related] |
Returns a cell that is diagonaly adjacent to the supplied cell. index goes from 0 -> 3, if outside this range, 0 is assumed. if the cell is on the edge behaviour is undefined.
double euclideanDistance |
( |
const Cell2D |
c1, |
|
|
const Cell2D |
c2 | |
|
) |
| | [related] |
Find the geometric distance between two cells
bool isAdjacentN |
( |
const Cell2D |
c1, |
|
|
const Cell2D |
c2, |
|
|
unsigned int |
N | |
|
) |
| | [related] |
Determine if a cell is within a square of size 2N+1 of another cell
bool isNull |
( |
const Cell2D |
c |
) |
[related] |
Check to see if a cell refers to (0,0)
int manhattanDistance |
( |
const Cell2D |
c1, |
|
|
const Cell2D |
c2 | |
|
) |
| | [related] |
Find the manhattan distance between two cells
std::ostream & operator<< |
( |
std::ostream & |
s, |
|
|
const Cell2D & |
obj | |
|
) |
| | [related] |
Cell2D surroundCell |
( |
const Cell2D & |
cell, |
|
|
const int |
i | |
|
) |
| | [related] |
Returns a cell that is directly adjacent or diagonally adjacent to the supplied cell. index goes from 0 -> 7, if outside this range, 0 is assumed. if the cell is on the edge behaviour is undefined.
The documentation for this class was generated from the following file:
|
|