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 |
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.
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 | ||||
) |
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 | ||||
) |
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.
Definition at line 314 of file enhanced_grid.py.