fast_grid.Container Class Reference

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

Inheritance diagram for fast_grid.Container:

fast_grid.Container2D fast_grid.Grid2D

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 82 of file fast_grid.py.


Member Function Documentation

def fast_grid.Container.__eq__ (   self,
  other 
)

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

Definition at line 99 of file fast_grid.py.

def fast_grid.Container.__init__ (   self,
  dims 
)

Parameters:
dim The dimensions of this grid

Definition at line 87 of file fast_grid.py.

def fast_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 118 of file fast_grid.py.

def fast_grid.Container.__ne__ (   self,
  other 
)

Equivalent to.

 not (self == other) 
.

Definition at line 111 of file fast_grid.py.

def fast_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 147 of file fast_grid.py.

def fast_grid.Container.copy_from (   self,
  other 
)

Definition at line 136 of file fast_grid.py.

def fast_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 125 of file fast_grid.py.


Member Data Documentation

Definition at line 95 of file fast_grid.py.

Definition at line 88 of file fast_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