![]() |
Chemical Data Processing Library Python API - Version 1.4.0
|
Immutable grid where all elements have the same value of type double.
More...
Inheritance diagram for CDPL.Math.DScalarGrid:Public Member Functions | |
| None | __init__ () |
| Constructs an empty scalar grid. | |
| None | __init__ (DScalarGrid g) |
Contructs a copy of the DScalarGrid instance g. More... | |
| None | __init__ (int m, int n, int o, float v=0.0) |
| Constructs a scalar grid of size m×n×o in which every element equals v. More... | |
| None | resize (int m, int n, int o) |
| Resizes the grid axes to (m, n, o). More... | |
| 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 (any axis has zero size). More... | |
| float | getElement (int i, int j, int k) |
| Returns the common element value. More... | |
| float | getElement (int i) |
| Returns the common element value. More... | |
| object | toArray () |
Converts the DScalarGrid instance into a corresponding numpy.ndarray object. More... | |
| int | getSize () |
| Returns the total element count \( \mathrm{size}_1 \cdot \mathrm{size}_2 \cdot \mathrm{size}_3 \). More... | |
| DScalarGrid | assign (DScalarGrid g) |
| Copy-assigns the axis sizes and common value from g. More... | |
| None | swap (DScalarGrid g) |
| Swaps the axis sizes and common value with g. More... | |
| float | __call__ (int i, int j, int k) |
| Returns the common element value. More... | |
| float | __call__ (int i) |
| Returns the common element value. More... | |
| float | __getitem__ (tuple ijk) |
| Returns the common element value. More... | |
| float | __getitem__ (int i) |
| Returns the common element value. More... | |
| int | __len__ () |
| Returns the total element count \( \mathrm{size}_1 \cdot \mathrm{size}_2 \cdot \mathrm{size}_3 \). More... | |
| bool | __eq__ (DScalarGrid 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__ (DScalarGrid 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 DScalarGrid instance. More... | |
| DScalarGrid | __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) | |
Immutable grid where all elements have the same value of type double.
| None CDPL.Math.DScalarGrid.__init__ | ( | DScalarGrid | g | ) |
Contructs a copy of the DScalarGrid instance g.
| g | The DScalarGrid instance to copy. |
| None CDPL.Math.DScalarGrid.__init__ | ( | int | m, |
| int | n, | ||
| int | o, | ||
| float | v = 0.0 |
||
| ) |
Constructs a scalar grid of size m×n×o in which every element equals v.
| m | The first-axis size. |
| n | The second-axis size. |
| o | The third-axis size. |
| v | The common element value. |
| None CDPL.Math.DScalarGrid.resize | ( | int | m, |
| int | n, | ||
| int | o | ||
| ) |
Resizes the grid axes to (m, n, o).
| m | The new first-axis size. |
| n | The new second-axis size. |
| o | The new third-axis size. |
| int CDPL.Math.DScalarGrid.getObjectID | ( | ) |
Returns the numeric identifier (ID) of the wrapped C++ class instance.
Different Python DScalarGrid 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 DScalarGrid 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.DScalarGrid.getSize1 | ( | ) |
Returns the first-axis size.
| int CDPL.Math.DScalarGrid.getSize2 | ( | ) |
Returns the second-axis size.
| int CDPL.Math.DScalarGrid.getSize3 | ( | ) |
Returns the third-axis size.
| bool CDPL.Math.DScalarGrid.isEmpty | ( | ) |
Tells whether the grid is empty (any axis has zero size).
True if any axis is zero, and False otherwise. | float CDPL.Math.DScalarGrid.getElement | ( | int | i, |
| int | j, | ||
| int | k | ||
| ) |
Returns the common element value.
| 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.DScalarGrid.getElement | ( | int | i | ) |
Returns the common element value.
| i | The zero-based linear index. |
| Base.IndexError | if i is out of range. |
| object CDPL.Math.DScalarGrid.toArray | ( | ) |
Converts the DScalarGrid instance into a corresponding numpy.ndarray object.
numpy.ndarray object. | int CDPL.Math.DScalarGrid.getSize | ( | ) |
Returns the total element count \( \mathrm{size}_1 \cdot \mathrm{size}_2 \cdot \mathrm{size}_3 \).
| DScalarGrid CDPL.Math.DScalarGrid.assign | ( | DScalarGrid | g | ) |
Copy-assigns the axis sizes and common value from g.
| g | The source scalar grid. |
| None CDPL.Math.DScalarGrid.swap | ( | DScalarGrid | g | ) |
Swaps the axis sizes and common value with g.
| g | The scalar grid to swap with. |
| float CDPL.Math.DScalarGrid.__call__ | ( | int | i, |
| int | j, | ||
| int | k | ||
| ) |
Returns the common element value.
| 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.DScalarGrid.__call__ | ( | int | i | ) |
Returns the common element value.
| i | The zero-based linear index. |
| Base.IndexError | if i is out of range. |
| float CDPL.Math.DScalarGrid.__getitem__ | ( | tuple | ijk | ) |
Returns the common element value.
| 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.DScalarGrid.__getitem__ | ( | int | i | ) |
Returns the common element value.
| i | The zero-based linear index. |
| Base.IndexError | if i is out of range. |
| int CDPL.Math.DScalarGrid.__len__ | ( | ) |
Returns the total element count \( \mathrm{size}_1 \cdot \mathrm{size}_2 \cdot \mathrm{size}_3 \).
| bool CDPL.Math.DScalarGrid.__eq__ | ( | DScalarGrid | g | ) |
Returns the result of the comparison operation self == g.
| g | The DScalarGrid instance to be compared with. |
| bool CDPL.Math.DScalarGrid.__eq__ | ( | ConstDGridExpression | e | ) |
Returns the result of the comparison operation self == e.
| e | The ConstDGridExpression instance to be compared with. |
| bool CDPL.Math.DScalarGrid.__ne__ | ( | DScalarGrid | g | ) |
Returns the result of the comparison operation self != g.
| g | The DScalarGrid instance to be compared with. |
| bool CDPL.Math.DScalarGrid.__ne__ | ( | ConstDGridExpression | e | ) |
Returns the result of the comparison operation self != e.
| e | The ConstDGridExpression instance to be compared with. |
| str CDPL.Math.DScalarGrid.__str__ | ( | ) |
Returns a string representation of the DScalarGrid instance.
| DScalarGrid CDPL.Math.DScalarGrid.__pos__ | ( | ) |
Returns self.
| ConstDGridExpression CDPL.Math.DScalarGrid.__neg__ | ( | ) |
Returns the result of the operation self * -1.
ConstDGridExpression instance holding the result of the element negation. | ConstDGridExpression CDPL.Math.DScalarGrid.__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.DScalarGrid.__sub__ | ( | ConstDGridExpression | e | ) |
Returns the result of the subtraction operation self - e.
| e | Specifies the subtrahend. |
DScalarGrid instance holding the result of the subtraction. | ConstDGridExpression CDPL.Math.DScalarGrid.__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.DScalarGrid.__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.DScalarGrid.__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.DScalarGrid.__rmul__ | ( | float | t | ) |
Returns the result of the multiplication operation t * self.
| t | Specifies the multiplicand. |
ConstDGridExpression instance holding the result of the multiplication.