![]() |
Chemical Data Processing Library Python API - Version 1.4.0
|
Represents the outcome of mathematical expressions/operations that result in a 3D grid. More...
Inheritance diagram for CDPL.Math.ConstDGridExpression:Public Member Functions | |
| 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 ConstDGridExpression 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__ (ConstDGridExpression e) |
Returns the result of the comparison operation self == e. More... | |
| bool | __ne__ (ConstDGridExpression e) |
Returns the result of the comparison operation self != e. More... | |
| str | __str__ () |
Returns a string representation of the ConstDGridExpression instance. More... | |
| ConstDGridExpression | __pos__ () |
| Returns self. More... | |
| ConstDGridExpression | __neg__ () |
Returns the result of the operation self * -1. More... | |
| 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... | |
Properties | |
| objectID = property(getObjectID) | |
| size1 = property(getSize1) | |
| size2 = property(getSize2) | |
| size3 = property(getSize3) | |
Represents the outcome of mathematical expressions/operations that result in a 3D grid.
| int CDPL.Math.ConstDGridExpression.getObjectID | ( | ) |
Returns the numeric identifier (ID) of the wrapped C++ class instance.
Different Python ConstDGridExpression 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 ConstDGridExpression 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().
| int CDPL.Math.ConstDGridExpression.getSize1 | ( | ) |
Returns the first-axis size.
| int CDPL.Math.ConstDGridExpression.getSize2 | ( | ) |
Returns the second-axis size.
| int CDPL.Math.ConstDGridExpression.getSize3 | ( | ) |
Returns the third-axis size.
| bool CDPL.Math.ConstDGridExpression.isEmpty | ( | ) |
Tells whether the grid is empty.
True if the underlying storage holds no elements, and False otherwise. | float CDPL.Math.ConstDGridExpression.getElement | ( | int | i, |
| int | j, | ||
| int | k | ||
| ) |
Returns the element at (i, j, k).
| i | The zero-based first-axis index. |
| j | The zero-based second-axis index. |
| k | The zero-based third-axis index. |
| Base.IndexError | if any of the indices is out of range. |
| object CDPL.Math.ConstDGridExpression.toArray | ( | ) |
Converts the ConstDGridExpression instance into a corresponding numpy.ndarray object.
numpy.ndarray object. | float CDPL.Math.ConstDGridExpression.__call__ | ( | int | i, |
| int | j, | ||
| int | k | ||
| ) |
Returns the element at (i, j, k).
| i | The zero-based first-axis index. |
| j | The zero-based second-axis index. |
| k | The zero-based third-axis index. |
| Base.IndexError | if any of the indices is out of range. |
| float CDPL.Math.ConstDGridExpression.__getitem__ | ( | tuple | ijk | ) |
Returns the element at (i, j, k).
| i | The zero-based first-axis index. |
| j | The zero-based second-axis index. |
| k | The zero-based third-axis index. |
| Base.IndexError | if any of the indices is out of range. |
| int CDPL.Math.ConstDGridExpression.__len__ | ( | ) |
Returns the total element count \( \mathrm{size}_1 \cdot \mathrm{size}_2 \cdot \mathrm{size}_3 \).
| bool CDPL.Math.ConstDGridExpression.__eq__ | ( | ConstDGridExpression | e | ) |
Returns the result of the comparison operation self == e.
| e | The ConstDGridExpression instance to be compared with. |
| bool CDPL.Math.ConstDGridExpression.__ne__ | ( | ConstDGridExpression | e | ) |
Returns the result of the comparison operation self != e.
| e | The ConstDGridExpression instance to be compared with. |
| str CDPL.Math.ConstDGridExpression.__str__ | ( | ) |
Returns a string representation of the ConstDGridExpression instance.
| ConstDGridExpression CDPL.Math.ConstDGridExpression.__pos__ | ( | ) |
Returns self.
| ConstDGridExpression CDPL.Math.ConstDGridExpression.__neg__ | ( | ) |
Returns the result of the operation self * -1.
ConstDGridExpression instance holding the result of the element negation. | ConstDGridExpression CDPL.Math.ConstDGridExpression.__add__ | ( | ConstDGridExpression | e | ) |
Returns the result of the addition operation self + e.
| e | Specifies the second addend. |
ConstDGridExpression instance holding the result of the addition. | ConstDGridExpression CDPL.Math.ConstDGridExpression.__sub__ | ( | ConstDGridExpression | e | ) |
Returns the result of the subtraction operation self - e.
| e | Specifies the subtrahend. |
ConstDGridExpression instance holding the result of the subtraction. | ConstDGridExpression CDPL.Math.ConstDGridExpression.__mul__ | ( | float | t | ) |
Returns the result of the multiplication operation self * t.
| t | Specifies the multiplier. |
ConstDGridExpression instance holding the result of the multiplication. | ConstDGridExpression CDPL.Math.ConstDGridExpression.__div__ | ( | float | t | ) |
Returns the result of the division operation self // t.
| t | Specifies the divisor. |
ConstDGridExpression instance holding the result of the division. | ConstDGridExpression CDPL.Math.ConstDGridExpression.__truediv__ | ( | float | t | ) |
Returns the result of the true division operation self / t.
| t | Specifies the divisor. |
ConstDGridExpression instance holding the result of the division. | ConstDGridExpression CDPL.Math.ConstDGridExpression.__rmul__ | ( | float | t | ) |
Returns the result of the multiplication operation t * self.
| t | Specifies the multiplicand. |
ConstDGridExpression instance holding the result of the multiplication.