Chemical Data Processing Library Python API - Version 1.4.0
Public Member Functions | Properties | List of all members
CDPL.Math.DRegularSpatialGrid Class Reference

Unbounded dense regular grid storing floating point values of type double. More...

+ Inheritance diagram for CDPL.Math.DRegularSpatialGrid:

Public Member Functions

None __init__ (DRegularSpatialGrid grid)
 Initializes a copy of the DRegularSpatialGrid instance grid. More...
 
None __init__ (DGrid data, float xs, float ys, float zs)
 Constructs the grid with anisotropic per-axis step sizes initialized to the supplied grid data. More...
 
None __init__ (DGrid data, float s)
 Constructs the grid with isotropic step size s and the supplied grid data. More...
 
None __init__ (float xs, float ys, float zs)
 Constructs an empty grid with anisotropic per-axis step sizes. More...
 
None __init__ (float s)
 Constructs an empty grid with isotropic step size s on all three axes. More...
 
None resize (int m, int n, int o, bool preserve=True, float v=0.0)
 Resizes the grid to \( m \times n \times o \) cells. More...
 
None clear (float v=0.0)
 Sets every cell of the grid to the value v. More...
 
float getXExtent ()
 Returns the spatial extent of the grid along the X axis ( \( (\mathrm{size}_1 - 1) \cdot \mathrm{xStep} \) for non-empty grids). More...
 
float getYExtent ()
 Returns the spatial extent of the grid along the Y axis. More...
 
float getZExtent ()
 Returns the spatial extent of the grid along the Z axis. More...
 
float getXStepSize ()
 Returns the per-cell step size along the X axis. More...
 
float getYStepSize ()
 Returns the per-cell step size along the Y axis. More...
 
float getZStepSize ()
 Returns the per-cell step size along the Z axis. More...
 
None setXStepSize (float xs)
 Sets the per-cell step size along the X axis to xs. More...
 
None setYStepSize (float ys)
 Sets the per-cell step size along the Y axis to ys. More...
 
None setZStepSize (float zs)
 Sets the per-cell step size along the Z axis to zs. More...
 
DGrid getData ()
 Returns a mutable reference to the underlying grid data container. More...
 
None setCoordinatesTransform (Matrix4D xform)
 Sets the cell-index to world-coordinate transformation to xform and caches its inverse. More...
 
Matrix4D getCoordinatesTransform ()
 Returns the coordinate transformation mapping cell-index coordinates to world coordinates. More...
 
None getCoordinates (int i, int j, int k, object coords)
 Writes the world-space 3D position of the cell at (i, j, k) into coords. More...
 
None getCoordinates (int i, object coords)
 Writes the world-space 3D position of the cell with linear index i into coords. More...
 
None getLocalCoordinates (int i, int j, int k, object coords)
 Writes the local-space 3D position of the cell at (i, j, k) into coords. More...
 
None getLocalCoordinates (Vector3D world_coords, object local_coords)
 Transforms the world-space point world_coords into the grid's local coordinate frame and stores the result in local_coords. More...
 
bool containsPoint (Vector3F pos)
 Tells whether the world-space point pos lies within the grid bounds. More...
 
bool containsPoint (ConstFVectorExpression pos)
 Tells whether the world-space point pos lies within the grid bounds. More...
 
bool containsPoint (Vector3D pos)
 Tells whether the world-space point pos lies within the grid bounds. More...
 
bool containsPoint (ConstDVectorExpression pos)
 Tells whether the world-space point pos lies within the grid bounds. More...
 
bool containsPoint (Vector3L pos)
 Tells whether the world-space point pos lies within the grid bounds. More...
 
bool containsPoint (ConstLVectorExpression pos)
 Tells whether the world-space point pos lies within the grid bounds. More...
 
bool containsPoint (Vector3UL pos)
 Tells whether the world-space point pos lies within the grid bounds. More...
 
bool containsPoint (ConstULVectorExpression pos)
 Tells whether the world-space point pos lies within the grid bounds. More...
 
bool containsLocalPoint (Vector3F pos)
 Tells whether the local-space point pos lies within the grid bounds. More...
 
bool containsLocalPoint (ConstFVectorExpression pos)
 Tells whether the local-space point pos lies within the grid bounds. More...
 
bool containsLocalPoint (Vector3D pos)
 Tells whether the local-space point pos lies within the grid bounds. More...
 
bool containsLocalPoint (ConstDVectorExpression pos)
 Tells whether the local-space point pos lies within the grid bounds. More...
 
bool containsLocalPoint (Vector3L pos)
 Tells whether the local-space point pos lies within the grid bounds. More...
 
bool containsLocalPoint (ConstLVectorExpression pos)
 Tells whether the local-space point pos lies within the grid bounds. More...
 
bool containsLocalPoint (Vector3UL pos)
 Tells whether the local-space point pos lies within the grid bounds. More...
 
bool containsLocalPoint (ConstULVectorExpression pos)
 Tells whether the local-space point pos lies within the grid bounds. More...
 
None getContainingCell (Vector3F pos, object indices)
 Writes the (i, j, k) cell indices of the cell containing the world-space point pos into indices. More...
 
None getContainingCell (ConstFVectorExpression pos, object indices)
 Writes the (i, j, k) cell indices of the cell containing the world-space point pos into indices. More...
 
None getContainingCell (Vector3D pos, object indices)
 Writes the (i, j, k) cell indices of the cell containing the world-space point pos into indices. More...
 
None getContainingCell (ConstDVectorExpression pos, object indices)
 Writes the (i, j, k) cell indices of the cell containing the world-space point pos into indices. More...
 
None getContainingCell (Vector3L pos, object indices)
 Writes the (i, j, k) cell indices of the cell containing the world-space point pos into indices. More...
 
None getContainingCell (ConstLVectorExpression pos, object indices)
 Writes the (i, j, k) cell indices of the cell containing the world-space point pos into indices. More...
 
None getContainingCell (Vector3UL pos, object indices)
 Writes the (i, j, k) cell indices of the cell containing the world-space point pos into indices. More...
 
None getContainingCell (ConstULVectorExpression pos, object indices)
 Writes the (i, j, k) cell indices of the cell containing the world-space point pos into indices. More...
 
None getLocalContainingCell (Vector3F pos, object indices)
 Writes the (i, j, k) cell indices of the cell containing the local-space point pos into indices. More...
 
None getLocalContainingCell (ConstFVectorExpression pos, object indices)
 Writes the (i, j, k) cell indices of the cell containing the local-space point pos into indices. More...
 
None getLocalContainingCell (Vector3D pos, object indices)
 Writes the (i, j, k) cell indices of the cell containing the local-space point pos into indices. More...
 
None getLocalContainingCell (ConstDVectorExpression pos, object indices)
 Writes the (i, j, k) cell indices of the cell containing the local-space point pos into indices. More...
 
None getLocalContainingCell (Vector3L pos, object indices)
 Writes the (i, j, k) cell indices of the cell containing the local-space point pos into indices. More...
 
None getLocalContainingCell (ConstLVectorExpression pos, object indices)
 Writes the (i, j, k) cell indices of the cell containing the local-space point pos into indices. More...
 
None getLocalContainingCell (Vector3UL pos, object indices)
 Writes the (i, j, k) cell indices of the cell containing the local-space point pos into indices. More...
 
None getLocalContainingCell (ConstULVectorExpression pos, object indices)
 Writes the (i, j, k) cell indices of the cell containing the local-space point pos into indices. More...
 
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
DRegularSpatialGrid assign (ConstFGridExpression e)
 Assigns the grid expression e to the underlying grid data without intermediate temporary. More...
 
DRegularSpatialGrid assign (ConstDGridExpression e)
 Assigns the grid expression e to the underlying grid data without intermediate temporary. More...
 
DRegularSpatialGrid assign (object e)
 Assigns the grid expression e to the underlying grid data without intermediate temporary. More...
 
DRegularSpatialGrid assign (DRegularSpatialGrid g)
 Replaces the current state of self with a copy of the state of the DRegularSpatialGrid instance g. More...
 
int getSize1 ()
 Returns the size of the grid along the first dimension. More...
 
int getSize2 ()
 Returns the size of the grid along the second dimension. More...
 
int getSize3 ()
 Returns the size of the grid along the third dimension. More...
 
bool isEmpty ()
 Tells whether the grid is empty (zero cells along any dimension). More...
 
float getElement (int i, int j, int k)
 
float getElement (int i)
 
object toArray ()
 
int getSize ()
 Returns the total number of cells of the grid. More...
 
None swap (DRegularSpatialGrid g)
 
None setElement (int i, int j, int k, float v)
 
None setElement (int i, float v)
 
float __call__ (int i, int j, int k)
 Returns a reference to the cell at the (i, j, k) position. More...
 
float __call__ (int i)
 Returns a reference to the cell at the linear index i. More...
 
float __getitem__ (tuple ijk)
 
float __getitem__ (int i)
 
int __len__ ()
 
bool __eq__ (DRegularSpatialGrid g)
 Returns the result of the comparison operation self == g. More...
 
bool __eq__ (ConstDGridExpression e)
 Returns the result of the comparison operation self == e. More...
 
bool __ne__ (DRegularSpatialGrid g)
 Returns the result of the comparison operation self != g. More...
 
bool __ne__ (ConstDGridExpression e)
 Returns the result of the comparison operation self != e. More...
 
str __str__ ()
 Returns a string representation of the DRegularSpatialGrid instance. More...
 
DRegularSpatialGrid __pos__ ()
 
ConstDGridExpression __neg__ ()
 
ConstDGridExpression __add__ (ConstDGridExpression e)
 Returns the result of the addition operation self + e. More...
 
ConstDGridExpression __sub__ (ConstDGridExpression e)
 Returns the result of the subtraction operation self - e. More...
 
ConstDGridExpression __mul__ (float t)
 Returns the result of the multiplication operation self * t. More...
 
ConstDGridExpression __div__ (float t)
 Returns the result of the division operation self // t. More...
 
ConstDGridExpression __truediv__ (float t)
 Returns the result of the true division operation self / t. More...
 
ConstDGridExpression __rmul__ (float t)
 Returns the result of the multiplication operation t * self. More...
 
None __setitem__ (tuple ijk, float v)
 
None __setitem__ (int i, float v)
 
DRegularSpatialGrid __iadd__ (DRegularSpatialGrid g)
 Performs the in-place addition operation self += g. More...
 
DRegularSpatialGrid __iadd__ (ConstDGridExpression e)
 Performs the in-place addition operation self += e. More...
 
DRegularSpatialGrid __isub__ (DRegularSpatialGrid g)
 Performs the in-place subtraction operation self -= g. More...
 
DRegularSpatialGrid __isub__ (ConstDGridExpression e)
 Performs the in-place subtraction operation self -= e. More...
 
DRegularSpatialGrid __imul__ (float t)
 Performs the in-place multiplication operation self *= t. More...
 
DRegularSpatialGrid __idiv__ (float t)
 Performs the in-place division operation self /= t. More...
 
DRegularSpatialGrid __itruediv__ (float t)
 

Properties

 data = property(getData)
 
 coordsTransform = property(getCoordinatesTransform, setCoordinatesTransform)
 
 xStepSize = property(getXStepSize, setXStepSize)
 
 yStepSize = property(getYStepSize, setYStepSize)
 
 zStepSize = property(getZStepSize, setZStepSize)
 
 xExtent = property(getXExtent)
 
 yExtent = property(getYExtent)
 
 zExtent = property(getZExtent)
 
 objectID = property(getObjectID)
 
 size1 = property(getSize1)
 
 size2 = property(getSize2)
 
 size3 = property(getSize3)
 

Detailed Description

Unbounded dense regular grid storing floating point values of type double.

Constructor & Destructor Documentation

◆ __init__() [1/5]

None CDPL.Math.DRegularSpatialGrid.__init__ ( DRegularSpatialGrid  grid)

Initializes a copy of the DRegularSpatialGrid instance grid.

Parameters
gridThe DRegularSpatialGrid instance to copy.

◆ __init__() [2/5]

None CDPL.Math.DRegularSpatialGrid.__init__ ( DGrid  data,
float  xs,
float  ys,
float  zs 
)

Constructs the grid with anisotropic per-axis step sizes initialized to the supplied grid data.

Parameters
dataThe grid data container.
xsThe step size along the X axis.
ysThe step size along the Y axis.
zsThe step size along the Z axis.

◆ __init__() [3/5]

None CDPL.Math.DRegularSpatialGrid.__init__ ( DGrid  data,
float  s 
)

Constructs the grid with isotropic step size s and the supplied grid data.

Parameters
dataThe grid data container.
sThe step size used on every axis.

◆ __init__() [4/5]

None CDPL.Math.DRegularSpatialGrid.__init__ ( float  xs,
float  ys,
float  zs 
)

Constructs an empty grid with anisotropic per-axis step sizes.

Parameters
xsThe step size along the X axis.
ysThe step size along the Y axis.
zsThe step size along the Z axis.

Reimplemented in CDPL.Grid.DRegularGrid.

◆ __init__() [5/5]

None CDPL.Math.DRegularSpatialGrid.__init__ ( float  s)

Constructs an empty grid with isotropic step size s on all three axes.

Parameters
sThe step size used on every axis.

Reimplemented in CDPL.Grid.DRegularGrid.

Member Function Documentation

◆ resize()

None CDPL.Math.DRegularSpatialGrid.resize ( int  m,
int  n,
int  o,
bool   preserve = True,
float   v = 0.0 
)

Resizes the grid to \( m \times n \times o \) cells.

Parameters
mThe new first-dimension size.
nThe new second-dimension size.
oThe new third-dimension size.
preserveIf True, existing cell values are kept where the indices remain valid. If False, all cells are set to v.
vThe fill value used for newly added cells (and for all cells if preserve is False).

◆ clear()

None CDPL.Math.DRegularSpatialGrid.clear ( float   v = 0.0)

Sets every cell of the grid to the value v.

Parameters
vThe fill value.

◆ getXExtent()

float CDPL.Math.DRegularSpatialGrid.getXExtent ( )

Returns the spatial extent of the grid along the X axis ( \( (\mathrm{size}_1 - 1) \cdot \mathrm{xStep} \) for non-empty grids).

Returns
The X-axis extent.

◆ getYExtent()

float CDPL.Math.DRegularSpatialGrid.getYExtent ( )

Returns the spatial extent of the grid along the Y axis.

Returns
The Y-axis extent.

◆ getZExtent()

float CDPL.Math.DRegularSpatialGrid.getZExtent ( )

Returns the spatial extent of the grid along the Z axis.

Returns
The Z-axis extent.

◆ getXStepSize()

float CDPL.Math.DRegularSpatialGrid.getXStepSize ( )

Returns the per-cell step size along the X axis.

Returns
The X-axis step size.

◆ getYStepSize()

float CDPL.Math.DRegularSpatialGrid.getYStepSize ( )

Returns the per-cell step size along the Y axis.

Returns
The Y-axis step size.

◆ getZStepSize()

float CDPL.Math.DRegularSpatialGrid.getZStepSize ( )

Returns the per-cell step size along the Z axis.

Returns
The Z-axis step size.

◆ setXStepSize()

None CDPL.Math.DRegularSpatialGrid.setXStepSize ( float  xs)

Sets the per-cell step size along the X axis to xs.

Parameters
xsThe new X-axis step size.

◆ setYStepSize()

None CDPL.Math.DRegularSpatialGrid.setYStepSize ( float  ys)

Sets the per-cell step size along the Y axis to ys.

Parameters
ysThe new Y-axis step size.

◆ setZStepSize()

None CDPL.Math.DRegularSpatialGrid.setZStepSize ( float  zs)

Sets the per-cell step size along the Z axis to zs.

Parameters
zsThe new Z-axis step size.

◆ getData()

DGrid CDPL.Math.DRegularSpatialGrid.getData ( )

Returns a mutable reference to the underlying grid data container.

Returns
A mutable reference to the grid data.

◆ setCoordinatesTransform()

None CDPL.Math.DRegularSpatialGrid.setCoordinatesTransform ( Matrix4D  xform)

Sets the cell-index to world-coordinate transformation to xform and caches its inverse.

Parameters
xformThe new transformation.
Exceptions
Base.CalculationFailedif the transformation cannot be inverted (only when math checks are enabled).

◆ getCoordinatesTransform()

Matrix4D CDPL.Math.DRegularSpatialGrid.getCoordinatesTransform ( )

Returns the coordinate transformation mapping cell-index coordinates to world coordinates.

Returns
A reference to the transformation matrix.

◆ getCoordinates() [1/2]

None CDPL.Math.DRegularSpatialGrid.getCoordinates ( int  i,
int  j,
int  k,
object  coords 
)

Writes the world-space 3D position of the cell at (i, j, k) into coords.

Parameters
iThe first-dimension cell index.
jThe second-dimension cell index.
kThe third-dimension cell index.
coordsThe output vector receiving the X/Y/Z position.

Reimplemented in CDPL.Grid.DRegularGrid.

◆ getCoordinates() [2/2]

None CDPL.Math.DRegularSpatialGrid.getCoordinates ( int  i,
object  coords 
)

Writes the world-space 3D position of the cell with linear index i into coords.

Parameters
iThe zero-based linear cell index.
coordsThe output vector receiving the X/Y/Z position.

Reimplemented in CDPL.Grid.DRegularGrid.

◆ getLocalCoordinates() [1/2]

None CDPL.Math.DRegularSpatialGrid.getLocalCoordinates ( int  i,
int  j,
int  k,
object  coords 
)

Writes the local-space 3D position of the cell at (i, j, k) into coords.

Local coordinates are centered at the grid origin (the cell-center cell-index coordinate system before applying the world-space transformation).

Parameters
iThe first-dimension cell index.
jThe second-dimension cell index.
kThe third-dimension cell index.
coordsThe output vector receiving the local X/Y/Z position.

◆ getLocalCoordinates() [2/2]

None CDPL.Math.DRegularSpatialGrid.getLocalCoordinates ( Vector3D  world_coords,
object  local_coords 
)

Transforms the world-space point world_coords into the grid's local coordinate frame and stores the result in local_coords.

Parameters
world_coordsThe input world-space 3D position.
local_coordsThe output vector receiving the local-frame 3D position.

◆ containsPoint() [1/8]

bool CDPL.Math.DRegularSpatialGrid.containsPoint ( Vector3F  pos)

Tells whether the world-space point pos lies within the grid bounds.

Parameters
posThe world-space 3D position to test.
Returns
True if pos is inside the grid, and False otherwise.

◆ containsPoint() [2/8]

bool CDPL.Math.DRegularSpatialGrid.containsPoint ( ConstFVectorExpression  pos)

Tells whether the world-space point pos lies within the grid bounds.

Parameters
posThe world-space 3D position to test.
Returns
True if pos is inside the grid, and False otherwise.

◆ containsPoint() [3/8]

bool CDPL.Math.DRegularSpatialGrid.containsPoint ( Vector3D  pos)

Tells whether the world-space point pos lies within the grid bounds.

Parameters
posThe world-space 3D position to test.
Returns
True if pos is inside the grid, and False otherwise.

◆ containsPoint() [4/8]

bool CDPL.Math.DRegularSpatialGrid.containsPoint ( ConstDVectorExpression  pos)

Tells whether the world-space point pos lies within the grid bounds.

Parameters
posThe world-space 3D position to test.
Returns
True if pos is inside the grid, and False otherwise.

◆ containsPoint() [5/8]

bool CDPL.Math.DRegularSpatialGrid.containsPoint ( Vector3L  pos)

Tells whether the world-space point pos lies within the grid bounds.

Parameters
posThe world-space 3D position to test.
Returns
True if pos is inside the grid, and False otherwise.

◆ containsPoint() [6/8]

bool CDPL.Math.DRegularSpatialGrid.containsPoint ( ConstLVectorExpression  pos)

Tells whether the world-space point pos lies within the grid bounds.

Parameters
posThe world-space 3D position to test.
Returns
True if pos is inside the grid, and False otherwise.

◆ containsPoint() [7/8]

bool CDPL.Math.DRegularSpatialGrid.containsPoint ( Vector3UL  pos)

Tells whether the world-space point pos lies within the grid bounds.

Parameters
posThe world-space 3D position to test.
Returns
True if pos is inside the grid, and False otherwise.

◆ containsPoint() [8/8]

bool CDPL.Math.DRegularSpatialGrid.containsPoint ( ConstULVectorExpression  pos)

Tells whether the world-space point pos lies within the grid bounds.

Parameters
posThe world-space 3D position to test.
Returns
True if pos is inside the grid, and False otherwise.

◆ containsLocalPoint() [1/8]

bool CDPL.Math.DRegularSpatialGrid.containsLocalPoint ( Vector3F  pos)

Tells whether the local-space point pos lies within the grid bounds.

Parameters
posThe local-frame 3D position to test.
Returns
True if pos is inside the grid, and False otherwise.

◆ containsLocalPoint() [2/8]

bool CDPL.Math.DRegularSpatialGrid.containsLocalPoint ( ConstFVectorExpression  pos)

Tells whether the local-space point pos lies within the grid bounds.

Parameters
posThe local-frame 3D position to test.
Returns
True if pos is inside the grid, and False otherwise.

◆ containsLocalPoint() [3/8]

bool CDPL.Math.DRegularSpatialGrid.containsLocalPoint ( Vector3D  pos)

Tells whether the local-space point pos lies within the grid bounds.

Parameters
posThe local-frame 3D position to test.
Returns
True if pos is inside the grid, and False otherwise.

◆ containsLocalPoint() [4/8]

bool CDPL.Math.DRegularSpatialGrid.containsLocalPoint ( ConstDVectorExpression  pos)

Tells whether the local-space point pos lies within the grid bounds.

Parameters
posThe local-frame 3D position to test.
Returns
True if pos is inside the grid, and False otherwise.

◆ containsLocalPoint() [5/8]

bool CDPL.Math.DRegularSpatialGrid.containsLocalPoint ( Vector3L  pos)

Tells whether the local-space point pos lies within the grid bounds.

Parameters
posThe local-frame 3D position to test.
Returns
True if pos is inside the grid, and False otherwise.

◆ containsLocalPoint() [6/8]

bool CDPL.Math.DRegularSpatialGrid.containsLocalPoint ( ConstLVectorExpression  pos)

Tells whether the local-space point pos lies within the grid bounds.

Parameters
posThe local-frame 3D position to test.
Returns
True if pos is inside the grid, and False otherwise.

◆ containsLocalPoint() [7/8]

bool CDPL.Math.DRegularSpatialGrid.containsLocalPoint ( Vector3UL  pos)

Tells whether the local-space point pos lies within the grid bounds.

Parameters
posThe local-frame 3D position to test.
Returns
True if pos is inside the grid, and False otherwise.

◆ containsLocalPoint() [8/8]

bool CDPL.Math.DRegularSpatialGrid.containsLocalPoint ( ConstULVectorExpression  pos)

Tells whether the local-space point pos lies within the grid bounds.

Parameters
posThe local-frame 3D position to test.
Returns
True if pos is inside the grid, and False otherwise.

◆ getContainingCell() [1/8]

None CDPL.Math.DRegularSpatialGrid.getContainingCell ( Vector3F  pos,
object  indices 
)

Writes the (i, j, k) cell indices of the cell containing the world-space point pos into indices.

Parameters
posThe world-space 3D position.
indicesThe output vector receiving the three cell indices.

◆ getContainingCell() [2/8]

None CDPL.Math.DRegularSpatialGrid.getContainingCell ( ConstFVectorExpression  pos,
object  indices 
)

Writes the (i, j, k) cell indices of the cell containing the world-space point pos into indices.

Parameters
posThe world-space 3D position.
indicesThe output vector receiving the three cell indices.

◆ getContainingCell() [3/8]

None CDPL.Math.DRegularSpatialGrid.getContainingCell ( Vector3D  pos,
object  indices 
)

Writes the (i, j, k) cell indices of the cell containing the world-space point pos into indices.

Parameters
posThe world-space 3D position.
indicesThe output vector receiving the three cell indices.

◆ getContainingCell() [4/8]

None CDPL.Math.DRegularSpatialGrid.getContainingCell ( ConstDVectorExpression  pos,
object  indices 
)

Writes the (i, j, k) cell indices of the cell containing the world-space point pos into indices.

Parameters
posThe world-space 3D position.
indicesThe output vector receiving the three cell indices.

◆ getContainingCell() [5/8]

None CDPL.Math.DRegularSpatialGrid.getContainingCell ( Vector3L  pos,
object  indices 
)

Writes the (i, j, k) cell indices of the cell containing the world-space point pos into indices.

Parameters
posThe world-space 3D position.
indicesThe output vector receiving the three cell indices.

◆ getContainingCell() [6/8]

None CDPL.Math.DRegularSpatialGrid.getContainingCell ( ConstLVectorExpression  pos,
object  indices 
)

Writes the (i, j, k) cell indices of the cell containing the world-space point pos into indices.

Parameters
posThe world-space 3D position.
indicesThe output vector receiving the three cell indices.

◆ getContainingCell() [7/8]

None CDPL.Math.DRegularSpatialGrid.getContainingCell ( Vector3UL  pos,
object  indices 
)

Writes the (i, j, k) cell indices of the cell containing the world-space point pos into indices.

Parameters
posThe world-space 3D position.
indicesThe output vector receiving the three cell indices.

◆ getContainingCell() [8/8]

None CDPL.Math.DRegularSpatialGrid.getContainingCell ( ConstULVectorExpression  pos,
object  indices 
)

Writes the (i, j, k) cell indices of the cell containing the world-space point pos into indices.

Parameters
posThe world-space 3D position.
indicesThe output vector receiving the three cell indices.

◆ getLocalContainingCell() [1/8]

None CDPL.Math.DRegularSpatialGrid.getLocalContainingCell ( Vector3F  pos,
object  indices 
)

Writes the (i, j, k) cell indices of the cell containing the local-space point pos into indices.

Parameters
posThe local-frame 3D position.
indicesThe output vector receiving the three cell indices.

◆ getLocalContainingCell() [2/8]

None CDPL.Math.DRegularSpatialGrid.getLocalContainingCell ( ConstFVectorExpression  pos,
object  indices 
)

Writes the (i, j, k) cell indices of the cell containing the local-space point pos into indices.

Parameters
posThe local-frame 3D position.
indicesThe output vector receiving the three cell indices.

◆ getLocalContainingCell() [3/8]

None CDPL.Math.DRegularSpatialGrid.getLocalContainingCell ( Vector3D  pos,
object  indices 
)

Writes the (i, j, k) cell indices of the cell containing the local-space point pos into indices.

Parameters
posThe local-frame 3D position.
indicesThe output vector receiving the three cell indices.

◆ getLocalContainingCell() [4/8]

None CDPL.Math.DRegularSpatialGrid.getLocalContainingCell ( ConstDVectorExpression  pos,
object  indices 
)

Writes the (i, j, k) cell indices of the cell containing the local-space point pos into indices.

Parameters
posThe local-frame 3D position.
indicesThe output vector receiving the three cell indices.

◆ getLocalContainingCell() [5/8]

None CDPL.Math.DRegularSpatialGrid.getLocalContainingCell ( Vector3L  pos,
object  indices 
)

Writes the (i, j, k) cell indices of the cell containing the local-space point pos into indices.

Parameters
posThe local-frame 3D position.
indicesThe output vector receiving the three cell indices.

◆ getLocalContainingCell() [6/8]

None CDPL.Math.DRegularSpatialGrid.getLocalContainingCell ( ConstLVectorExpression  pos,
object  indices 
)

Writes the (i, j, k) cell indices of the cell containing the local-space point pos into indices.

Parameters
posThe local-frame 3D position.
indicesThe output vector receiving the three cell indices.

◆ getLocalContainingCell() [7/8]

None CDPL.Math.DRegularSpatialGrid.getLocalContainingCell ( Vector3UL  pos,
object  indices 
)

Writes the (i, j, k) cell indices of the cell containing the local-space point pos into indices.

Parameters
posThe local-frame 3D position.
indicesThe output vector receiving the three cell indices.

◆ getLocalContainingCell() [8/8]

None CDPL.Math.DRegularSpatialGrid.getLocalContainingCell ( ConstULVectorExpression  pos,
object  indices 
)

Writes the (i, j, k) cell indices of the cell containing the local-space point pos into indices.

Parameters
posThe local-frame 3D position.
indicesThe output vector receiving the three cell indices.

◆ getObjectID()

int CDPL.Math.DRegularSpatialGrid.getObjectID ( )

Returns the numeric identifier (ID) of the wrapped C++ class instance.

Different Python DRegularSpatialGrid instances may reference the same underlying C++ class instance. The commonly used Python expression a is not b thus cannot tell reliably whether the two DRegularSpatialGrid instances a and b reference different C++ objects. The numeric identifier returned by this method allows to correctly implement such an identity test via the simple expression a.getObjectID() != b.getObjectID().

Returns
The numeric ID of the internally referenced C++ class instance.

◆ assign() [1/4]

DRegularSpatialGrid CDPL.Math.DRegularSpatialGrid.assign ( ConstFGridExpression  e)

Assigns the grid expression e to the underlying grid data without intermediate temporary.

Parameters
eThe source grid expression.
Returns
self

◆ assign() [2/4]

DRegularSpatialGrid CDPL.Math.DRegularSpatialGrid.assign ( ConstDGridExpression  e)

Assigns the grid expression e to the underlying grid data without intermediate temporary.

Parameters
eThe source grid expression.
Returns
self

◆ assign() [3/4]

DRegularSpatialGrid CDPL.Math.DRegularSpatialGrid.assign ( object  e)

Assigns the grid expression e to the underlying grid data without intermediate temporary.

Parameters
eThe source grid expression.
Returns
self

Reimplemented in CDPL.Grid.DRegularGrid.

◆ assign() [4/4]

DRegularSpatialGrid CDPL.Math.DRegularSpatialGrid.assign ( DRegularSpatialGrid  g)

Replaces the current state of self with a copy of the state of the DRegularSpatialGrid instance g.

Parameters
gThe DRegularSpatialGrid instance to copy.
Returns
self

◆ getSize1()

int CDPL.Math.DRegularSpatialGrid.getSize1 ( )

Returns the size of the grid along the first dimension.

Returns
The first-dimension size.

Reimplemented in CDPL.Grid.DRegularGrid.

◆ getSize2()

int CDPL.Math.DRegularSpatialGrid.getSize2 ( )

Returns the size of the grid along the second dimension.

Returns
The second-dimension size.

Reimplemented in CDPL.Grid.DRegularGrid.

◆ getSize3()

int CDPL.Math.DRegularSpatialGrid.getSize3 ( )

Returns the size of the grid along the third dimension.

Returns
The third-dimension size.

Reimplemented in CDPL.Grid.DRegularGrid.

◆ isEmpty()

bool CDPL.Math.DRegularSpatialGrid.isEmpty ( )

Tells whether the grid is empty (zero cells along any dimension).

Returns
True if the grid is empty, and False otherwise.

Reimplemented in CDPL.Grid.DRegularGrid.

◆ getElement() [1/2]

float CDPL.Math.DRegularSpatialGrid.getElement ( int  i,
int  j,
int  k 
)
Parameters
i
j
k
Returns

Reimplemented in CDPL.Grid.DRegularGrid.

◆ getElement() [2/2]

float CDPL.Math.DRegularSpatialGrid.getElement ( int  i)
Parameters
i
Returns

Reimplemented in CDPL.Grid.DRegularGrid.

◆ toArray()

object CDPL.Math.DRegularSpatialGrid.toArray ( )
Returns

Reimplemented in CDPL.Grid.DRegularGrid.

◆ getSize()

int CDPL.Math.DRegularSpatialGrid.getSize ( )

Returns the total number of cells of the grid.

Returns
The total cell count.

Reimplemented in CDPL.Grid.DRegularGrid.

◆ swap()

None CDPL.Math.DRegularSpatialGrid.swap ( DRegularSpatialGrid  g)
Parameters
g

◆ setElement() [1/2]

None CDPL.Math.DRegularSpatialGrid.setElement ( int  i,
int  j,
int  k,
float  v 
)
Parameters
i
j
k
v

Reimplemented in CDPL.Grid.DRegularGrid.

◆ setElement() [2/2]

None CDPL.Math.DRegularSpatialGrid.setElement ( int  i,
float  v 
)
Parameters
i
v

Reimplemented in CDPL.Grid.DRegularGrid.

◆ __call__() [1/2]

float CDPL.Math.DRegularSpatialGrid.__call__ ( int  i,
int  j,
int  k 
)

Returns a reference to the cell at the (i, j, k) position.

Parameters
iThe zero-based first-dimension index.
jThe zero-based second-dimension index.
kThe zero-based third-dimension index.
Returns
A reference to the cell value.

Reimplemented in CDPL.Grid.DRegularGrid.

◆ __call__() [2/2]

float CDPL.Math.DRegularSpatialGrid.__call__ ( int  i)

Returns a reference to the cell at the linear index i.

Parameters
iThe zero-based linear cell index.
Returns
A reference to the cell value.

Reimplemented in CDPL.Grid.DRegularGrid.

◆ __getitem__() [1/2]

float CDPL.Math.DRegularSpatialGrid.__getitem__ ( tuple  ijk)
Parameters
ijk
Returns

Reimplemented in CDPL.Grid.DRegularGrid.

◆ __getitem__() [2/2]

float CDPL.Math.DRegularSpatialGrid.__getitem__ ( int  i)
Parameters
i
Returns

Reimplemented in CDPL.Grid.DRegularGrid.

◆ __len__()

int CDPL.Math.DRegularSpatialGrid.__len__ ( )
Returns

Reimplemented in CDPL.Grid.DRegularGrid.

◆ __eq__() [1/2]

bool CDPL.Math.DRegularSpatialGrid.__eq__ ( DRegularSpatialGrid  g)

Returns the result of the comparison operation self == g.

Parameters
gThe DRegularSpatialGrid instance to be compared with.
Returns
The result of the comparison operation.

◆ __eq__() [2/2]

bool CDPL.Math.DRegularSpatialGrid.__eq__ ( ConstDGridExpression  e)

Returns the result of the comparison operation self == e.

Parameters
eThe ConstDGridExpression instance to be compared with.
Returns
The result of the comparison operation.

◆ __ne__() [1/2]

bool CDPL.Math.DRegularSpatialGrid.__ne__ ( DRegularSpatialGrid  g)

Returns the result of the comparison operation self != g.

Parameters
gThe DRegularSpatialGrid instance to be compared with.
Returns
The result of the comparison operation.

◆ __ne__() [2/2]

bool CDPL.Math.DRegularSpatialGrid.__ne__ ( ConstDGridExpression  e)

Returns the result of the comparison operation self != e.

Parameters
eThe ConstDGridExpression instance to be compared with.
Returns
The result of the comparison operation.

◆ __str__()

str CDPL.Math.DRegularSpatialGrid.__str__ ( )

Returns a string representation of the DRegularSpatialGrid instance.

Returns
The generated string representation.

Reimplemented in CDPL.Grid.DRegularGrid.

◆ __pos__()

DRegularSpatialGrid CDPL.Math.DRegularSpatialGrid.__pos__ ( )
Returns

Reimplemented in CDPL.Grid.DRegularGrid.

◆ __neg__()

ConstDGridExpression CDPL.Math.DRegularSpatialGrid.__neg__ ( )
Returns

Reimplemented in CDPL.Grid.DRegularGrid.

◆ __add__()

ConstDGridExpression CDPL.Math.DRegularSpatialGrid.__add__ ( ConstDGridExpression  e)

Returns the result of the addition operation self + e.

Parameters
eSpecifies the second addend.
Returns
A ConstDGridExpression instance holding the result of the addition.

◆ __sub__()

ConstDGridExpression CDPL.Math.DRegularSpatialGrid.__sub__ ( ConstDGridExpression  e)

Returns the result of the subtraction operation self - e.

Parameters
eSpecifies the subtrahend.
Returns
A DRegularSpatialGrid instance holding the result of the subtraction.

◆ __mul__()

ConstDGridExpression CDPL.Math.DRegularSpatialGrid.__mul__ ( float  t)

Returns the result of the multiplication operation self * t.

Parameters
tSpecifies the multiplier.
Returns
A ConstDGridExpression instance holding the result of the multiplication.

Reimplemented in CDPL.Grid.DRegularGrid.

◆ __div__()

ConstDGridExpression CDPL.Math.DRegularSpatialGrid.__div__ ( float  t)

Returns the result of the division operation self // t.

Parameters
tSpecifies the divisor.
Returns
A ConstDGridExpression instance holding the result of the division.

Reimplemented in CDPL.Grid.DRegularGrid.

◆ __truediv__()

ConstDGridExpression CDPL.Math.DRegularSpatialGrid.__truediv__ ( float  t)

Returns the result of the true division operation self / t.

Parameters
tSpecifies the divisor.
Returns
A ConstDGridExpression instance holding the result of the division.

Reimplemented in CDPL.Grid.DRegularGrid.

◆ __rmul__()

ConstDGridExpression CDPL.Math.DRegularSpatialGrid.__rmul__ ( float  t)

Returns the result of the multiplication operation t * self.

Parameters
tSpecifies the multiplicand.
Returns
A ConstDGridExpression instance holding the result of the multiplication.

Reimplemented in CDPL.Grid.DRegularGrid.

◆ __setitem__() [1/2]

None CDPL.Math.DRegularSpatialGrid.__setitem__ ( tuple  ijk,
float  v 
)
Parameters
ijk
v

Reimplemented in CDPL.Grid.DRegularGrid.

◆ __setitem__() [2/2]

None CDPL.Math.DRegularSpatialGrid.__setitem__ ( int  i,
float  v 
)
Parameters
i
v

Reimplemented in CDPL.Grid.DRegularGrid.

◆ __iadd__() [1/2]

DRegularSpatialGrid CDPL.Math.DRegularSpatialGrid.__iadd__ ( DRegularSpatialGrid  g)

Performs the in-place addition operation self += g.

Parameters
gSpecifies the second addend.
Returns
The updated DRegularSpatialGrid instance self.

◆ __iadd__() [2/2]

DRegularSpatialGrid CDPL.Math.DRegularSpatialGrid.__iadd__ ( ConstDGridExpression  e)

Performs the in-place addition operation self += e.

Parameters
eSpecifies the second addend.
Returns
The updated DRegularSpatialGrid instance self.

◆ __isub__() [1/2]

DRegularSpatialGrid CDPL.Math.DRegularSpatialGrid.__isub__ ( DRegularSpatialGrid  g)

Performs the in-place subtraction operation self -= g.

Parameters
gSpecifies the subtrahend.
Returns
The updated DRegularSpatialGrid instance self.

◆ __isub__() [2/2]

DRegularSpatialGrid CDPL.Math.DRegularSpatialGrid.__isub__ ( ConstDGridExpression  e)

Performs the in-place subtraction operation self -= e.

Parameters
eSpecifies the subtrahend.
Returns
The updated DRegularSpatialGrid instance self.

◆ __imul__()

DRegularSpatialGrid CDPL.Math.DRegularSpatialGrid.__imul__ ( float  t)

Performs the in-place multiplication operation self *= t.

Parameters
tSpecifies the multiplier.
Returns
The updated DRegularSpatialGrid instance self.

Reimplemented in CDPL.Grid.DRegularGrid.

◆ __idiv__()

DRegularSpatialGrid CDPL.Math.DRegularSpatialGrid.__idiv__ ( float  t)

Performs the in-place division operation self /= t.

Parameters
tSpecifies the divisor.
Returns
The updated DRegularSpatialGrid instance self.

Reimplemented in CDPL.Grid.DRegularGrid.

◆ __itruediv__()

DRegularSpatialGrid CDPL.Math.DRegularSpatialGrid.__itruediv__ ( float  t)
Parameters
t
Returns

Reimplemented in CDPL.Grid.DRegularGrid.