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

Represents the outcome of mathematical expressions/operations that result in a 3D grid. More...

+ Inheritance diagram for CDPL.Math.FGridExpression:

Public Member Functions

None swap (FGridExpression e)
 Swaps the contents of this grid expression with those of e. More...
 
FGridExpression assign (FGridExpression e)
 Assigns the contents of the grid expression e to this expression. More...
 
FGridExpression assign (ConstFGridExpression e)
 Assigns the contents of the grid expression e to this expression. More...
 
FGridExpression assign (ConstDGridExpression e)
 Assigns the contents of the grid expression e to this expression. More...
 
None assign (object a)
 Assigns the contents of the 3D numpy.ndarray object a to this grid expression. More...
 
None setElement (int i, int j, int k, float v)
 Sets the value of the element (i, j, k) to v. More...
 
None __setitem__ (tuple ijk, float v)
 Sets the value of the element (i, j, k) to v. More...
 
FGridExpression __iadd__ (FGridExpression e)
 Adds the grid expression e element-wise to this expression. More...
 
FGridExpression __iadd__ (ConstFGridExpression e)
 Adds the grid expression e element-wise to this expression. More...
 
FGridExpression __isub__ (FGridExpression e)
 Subtracts the grid expression e element-wise from this expression. More...
 
FGridExpression __isub__ (ConstFGridExpression e)
 Subtracts the grid expression e element-wise from this expression. More...
 
FGridExpression __imul__ (float t)
 Multiplies every element by the scalar t. More...
 
FGridExpression __idiv__ (float t)
 Divides every element by the scalar t. More...
 
FGridExpression __itruediv__ (float t)
 Divides every element by the scalar t. More...
 
- Public Member Functions inherited from CDPL.Math.ConstFGridExpression
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
int getSize1 ()
 Returns the first-axis size. More...
 
int getSize2 ()
 Returns the second-axis size. More...
 
int getSize3 ()
 Returns the third-axis size. More...
 
bool isEmpty ()
 Tells whether the grid is empty. More...
 
float getElement (int i, int j, int k)
 Returns the element at (i, j, k). More...
 
object toArray ()
 Converts the ConstFGridExpression instance into a corresponding numpy.ndarray object. More...
 
float __call__ (int i, int j, int k)
 Returns the element at (i, j, k). More...
 
float __getitem__ (tuple ijk)
 Returns the element at (i, j, k). More...
 
int __len__ ()
 Returns the total element count \( \mathrm{size}_1 \cdot \mathrm{size}_2 \cdot \mathrm{size}_3 \). More...
 
bool __eq__ (ConstFGridExpression e)
 Returns the result of the comparison operation self == e. More...
 
bool __ne__ (ConstFGridExpression e)
 Returns the result of the comparison operation self != e. More...
 
str __str__ ()
 Returns a string representation of the ConstFGridExpression instance. More...
 
ConstFGridExpression __pos__ ()
 Returns self. More...
 
ConstFGridExpression __neg__ ()
 Returns the result of the operation self * -1. More...
 
ConstFGridExpression __add__ (ConstFGridExpression e)
 Returns the result of the addition operation self + e. More...
 
ConstFGridExpression __sub__ (ConstFGridExpression e)
 Returns the result of the subtraction operation self - e. More...
 
ConstFGridExpression __mul__ (float t)
 Returns the result of the multiplication operation self * t. More...
 
ConstFGridExpression __div__ (float t)
 Returns the result of the division operation self // t. More...
 
ConstFGridExpression __truediv__ (float t)
 Returns the result of the true division operation self / t. More...
 
ConstFGridExpression __rmul__ (float t)
 Returns the result of the multiplication operation t * self. More...
 

Additional Inherited Members

- Properties inherited from CDPL.Math.ConstFGridExpression
 objectID = property(getObjectID)
 
 size1 = property(getSize1)
 
 size2 = property(getSize2)
 
 size3 = property(getSize3)
 

Detailed Description

Represents the outcome of mathematical expressions/operations that result in a 3D grid.

Member Function Documentation

◆ swap()

None CDPL.Math.FGridExpression.swap ( FGridExpression  e)

Swaps the contents of this grid expression with those of e.

Parameters
eThe grid expression to swap with.

◆ assign() [1/4]

FGridExpression CDPL.Math.FGridExpression.assign ( FGridExpression  e)

Assigns the contents of the grid expression e to this expression.

Parameters
eThe source grid expression.
Returns
self.

◆ assign() [2/4]

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

Assigns the contents of the grid expression e to this expression.

Parameters
eThe source grid expression.
Returns
self.

◆ assign() [3/4]

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

Assigns the contents of the grid expression e to this expression.

Parameters
eThe source grid expression.
Returns
self.

◆ assign() [4/4]

None CDPL.Math.FGridExpression.assign ( object  a)

Assigns the contents of the 3D numpy.ndarray object a to this grid expression.

Parameters
aThe numpy.ndarray object.
See also
[NUMPY]

◆ setElement()

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

Sets the value of the element (i, j, k) to v.

Parameters
iThe zero-based first-axis index.
jThe zero-based second-axis index.
kThe zero-based third-axis index.
vThe new value of the element.
Exceptions
Base.IndexErrorif any of the indices is out of range.

◆ __setitem__()

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

Sets the value of the element (i, j, k) to v.

Parameters
iThe zero-based first-axis index.
jThe zero-based second-axis index.
kThe zero-based third-axis index.
vThe new value of the element.
Exceptions
Base.IndexErrorif any of the indices is out of range.

◆ __iadd__() [1/2]

FGridExpression CDPL.Math.FGridExpression.__iadd__ ( FGridExpression  e)

Adds the grid expression e element-wise to this expression.

Parameters
eThe source grid expression.
Returns
self.

◆ __iadd__() [2/2]

FGridExpression CDPL.Math.FGridExpression.__iadd__ ( ConstFGridExpression  e)

Adds the grid expression e element-wise to this expression.

Parameters
eThe source grid expression.
Returns
self.

◆ __isub__() [1/2]

FGridExpression CDPL.Math.FGridExpression.__isub__ ( FGridExpression  e)

Subtracts the grid expression e element-wise from this expression.

Parameters
eThe source grid expression.
Returns
self.

◆ __isub__() [2/2]

FGridExpression CDPL.Math.FGridExpression.__isub__ ( ConstFGridExpression  e)

Subtracts the grid expression e element-wise from this expression.

Parameters
eThe source grid expression.
Returns
self.

◆ __imul__()

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

Multiplies every element by the scalar t.

Parameters
tThe scalar multiplier.
Returns
self.

◆ __idiv__()

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

Divides every element by the scalar t.

Parameters
tThe scalar divisor.
Returns
self.

◆ __itruediv__()

FGridExpression CDPL.Math.FGridExpression.__itruediv__ ( float  t)

Divides every element by the scalar t.

Parameters
tThe scalar divisor.
Returns
self.