
Public Member Functions | |
| def | __init__ |
| def | __str__ |
| def | __iter__ |
| def | cell_iter |
| Returns the same iterator as __iter__. | |
| def | window_iter |
| Returns an iterator that iterates over a subgrid of this grid. | |
| def | wrapped_window_iter |
| Returns an iterator that iterates over a subgrid of this grid. | |
| def | square_iter |
| Returns an iterator that iterates over all cells in the square surrounding the given point. | |
| def | wrapped_square_iter |
| def | index_iter |
| Returns an iterator that iterates over the indeces of this container. | |
Public Attributes | |
| length | |
Definition at line 373 of file enhanced_grid.py.
| def enhanced_grid.Container1D.__init__ | ( | self, | ||
| dims | ||||
| ) |
| dim | The dimensions of this grid |
Reimplemented from enhanced_grid.Container.
Definition at line 374 of file enhanced_grid.py.
| def enhanced_grid.Container1D.__iter__ | ( | self | ) |
Definition at line 388 of file enhanced_grid.py.
| def enhanced_grid.Container1D.__str__ | ( | self | ) |
Definition at line 379 of file enhanced_grid.py.
| def enhanced_grid.Container1D.cell_iter | ( | self | ) |
Returns the same iterator as __iter__.
Provided so that all containers have consistent cell_iter methods.
Reimplemented in enhanced_grid.Grid1D.
Definition at line 396 of file enhanced_grid.py.
| def enhanced_grid.Container1D.index_iter | ( | self | ) |
Returns an iterator that iterates over the indeces of this container.
If grid is a 2 by 2 grid, then:
for p in index_iter(grid): print p
0, 0 0, 1 1, 0 1, 1
for p in index_iter(grid): grid[p] = random()
Definition at line 459 of file enhanced_grid.py.
| def enhanced_grid.Container1D.square_iter | ( | self, | ||
| x, | ||||
| n | ||||
| ) |
Returns an iterator that iterates over all cells in the square surrounding the given point.
The square is 2*n + 1 units.
Definition at line 433 of file enhanced_grid.py.
| def enhanced_grid.Container1D.window_iter | ( | self, | ||
| x1, | ||||
| x0 | ||||
| ) |
Returns an iterator that iterates over a subgrid of this grid.
The iteratir will iterate over all cells x, y in the grid such that
x0 <= x < x1 y0 <= y < y1
Definition at line 408 of file enhanced_grid.py.
| def enhanced_grid.Container1D.wrapped_square_iter | ( | self, | ||
| x, | ||||
| n | ||||
| ) |
Definition at line 436 of file enhanced_grid.py.
| def enhanced_grid.Container1D.wrapped_window_iter | ( | self, | ||
| x1, | ||||
| x0 | ||||
| ) |
Returns an iterator that iterates over a subgrid of this grid.
The iteratir will iterate over all cells x, y in the grid such that
x0 <= x < x1 y0 <= y < y1
Definition at line 424 of file enhanced_grid.py.
Definition at line 376 of file enhanced_grid.py.
1.5.8