enhanced_grid.Container Class Reference

Abstract super class of all grid-like containers. More...

Inheritance diagram for enhanced_grid.Container:

enhanced_grid.Container1D enhanced_grid.Container2D enhanced_grid.Container3D enhanced_grid.Grid1D enhanced_grid.GridBar3D enhanced_grid.GridCol2D enhanced_grid.GridCol3D enhanced_grid.GridRow2D enhanced_grid.GridRow3D enhanced_grid.GridWindow1D enhanced_grid.Grid2D enhanced_grid.GridSliceXY enhanced_grid.GridSliceXZ enhanced_grid.GridSliceYZ enhanced_grid.GridWindow2D quadtree.Quadtree enhanced_grid.Grid3D enhanced_grid.GridWindow3D

List of all members.

Public Member Functions

def __init__
def __eq__
 Test whether two containers have the same dimensions and the same items at equal indices.
def __ne__
 Equivalent to.
def __len__
 Returns the length (1D) or width (nD) of this container.
def min_max
 Returns the minimum and maximum elements of this grid as a tuple.
def copy_from
def clone
 Makes a shallow copy of this container.

Public Attributes

 dims
 count


Detailed Description

Abstract super class of all grid-like containers.

These containers are static, that is, once they are created, their dimensions cannot change.

Children of this class must implement the attribute __clonetype__, which must hold a callable type that can be constructed for clones.

Children must also implement the iterators cell_iter() and index_iter().

Definition at line 301 of file enhanced_grid.py.


Member Function Documentation

def enhanced_grid.Container.__eq__ (   self,
  other 
)

Test whether two containers have the same dimensions and the same items at equal indices.

Definition at line 318 of file enhanced_grid.py.

def enhanced_grid.Container.__init__ (   self,
  dims 
)

Parameters:
dim The dimensions of this grid

Reimplemented in enhanced_grid.Container1D, enhanced_grid.ListGrid3D, and enhanced_grid.ListGrid2D.

Definition at line 306 of file enhanced_grid.py.

def enhanced_grid.Container.__len__ (   self  ) 

Returns the length (1D) or width (nD) of this container.

The length of a container is defined such that the length behaves as it would for a list of lists.

Definition at line 337 of file enhanced_grid.py.

def enhanced_grid.Container.__ne__ (   self,
  other 
)

Equivalent to.

 not (self == other) 
.

Definition at line 330 of file enhanced_grid.py.

def enhanced_grid.Container.clone (   self  ) 

Makes a shallow copy of this container.

This method constructs an instance of this instance's __clonetype__. In general, if this class is an AuxiliaryContainer, the clone will be a PrincipleContainer of the same dimension.

Definition at line 366 of file enhanced_grid.py.

def enhanced_grid.Container.copy_from (   self,
  other 
)

Definition at line 355 of file enhanced_grid.py.

def enhanced_grid.Container.min_max (   self  ) 

Returns the minimum and maximum elements of this grid as a tuple.

This method assumes the grid is filled.

Definition at line 344 of file enhanced_grid.py.


Member Data Documentation

Definition at line 314 of file enhanced_grid.py.

Reimplemented in quadtree.Quadtree.

Definition at line 307 of file enhanced_grid.py.


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

Generated on Sun May 24 21:48:21 2009 by  doxygen 1.5.8