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

An unbounded dense grid holding floating point values of type float. More...

+ Inheritance diagram for CDPL.Math.FGrid:

Public Member Functions

None __init__ ()
 Initializes the FGrid instance.
 
None __init__ (FGrid g)
 Initializes a copy of the FGrid instance g. More...
 
None __init__ (int m, int n, int o)
 Initializes the FGrid instance. More...
 
None __init__ (int m, int n, int o, float v)
 Initializes the FGrid instance. More...
 
None __init__ (ConstFGridExpression e)
 Initializes the FGrid instance. More...
 
None __init__ (ConstDGridExpression e)
 Initializes the FGrid instance. More...
 
None __init__ (object e)
 Initializes the FGrid instance. More...
 
None resize (int m, int n, int o, bool preserve=True, float v=0.0)
 
None clear (float v=0.0)
 
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
FGrid assign (ConstFGridExpression e)
 Replaces the current state of self with a copy of the state of the ConstFGridExpression instance e. More...
 
FGrid assign (ConstDGridExpression e)
 Replaces the current state of self with a copy of the state of the ConstDGridExpression instance e. More...
 
FGrid assign (object e)
 Replaces the current state of self with a copy of the state of the object instance e. More...
 
FGrid assign (FGrid g)
 Replaces the current state of self with a copy of the state of the FGrid instance g. More...
 
int getSize1 ()
 
int getSize2 ()
 
int getSize3 ()
 
bool isEmpty ()
 
float getElement (int i, int j, int k)
 
float getElement (int i)
 
object toArray ()
 
int getSize ()
 
None swap (FGrid 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)
 
float __call__ (int i)
 
float __getitem__ (tuple ijk)
 
float __getitem__ (int i)
 
int __len__ ()
 
bool __eq__ (FGrid g)
 Returns the result of the comparison operation self == g. More...
 
bool __eq__ (ConstFGridExpression e)
 Returns the result of the comparison operation self == e. More...
 
bool __ne__ (FGrid g)
 Returns the result of the comparison operation self != g. More...
 
bool __ne__ (ConstFGridExpression e)
 Returns the result of the comparison operation self != e. More...
 
str __str__ ()
 Returns a string representation of the FGrid instance. More...
 
FGrid __pos__ ()
 
ConstFGridExpression __neg__ ()
 
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)
 
ConstFGridExpression __rmul__ (float t)
 
None __setitem__ (tuple ijk, float v)
 
None __setitem__ (int i, float v)
 
FGrid __iadd__ (FGrid g)
 Performs the in-place addition operation self += g. More...
 
FGrid __iadd__ (ConstFGridExpression e)
 Performs the in-place addition operation self += e. More...
 
FGrid __isub__ (FGrid g)
 Performs the in-place subtraction operation self -= g. More...
 
FGrid __isub__ (ConstFGridExpression e)
 Performs the in-place subtraction operation self -= e. More...
 
FGrid __imul__ (float t)
 Performs the in-place multiplication operation self *= t. More...
 
FGrid __idiv__ (float t)
 Performs the in-place division operation self /= t. More...
 
FGrid __itruediv__ (float t)
 

Properties

 objectID = property(getObjectID)
 
 size1 = property(getSize1)
 
 size2 = property(getSize2)
 
 size3 = property(getSize3)
 

Detailed Description

An unbounded dense grid holding floating point values of type float.

Constructor & Destructor Documentation

◆ __init__() [1/6]

None CDPL.Math.FGrid.__init__ ( FGrid  g)

Initializes a copy of the FGrid instance g.

Parameters
gThe FGrid instance to copy.

◆ __init__() [2/6]

None CDPL.Math.FGrid.__init__ ( int  m,
int  n,
int  o 
)

Initializes the FGrid instance.

Parameters
m
n
o

◆ __init__() [3/6]

None CDPL.Math.FGrid.__init__ ( int  m,
int  n,
int  o,
float  v 
)

Initializes the FGrid instance.

Parameters
m
n
o
v

◆ __init__() [4/6]

None CDPL.Math.FGrid.__init__ ( ConstFGridExpression  e)

Initializes the FGrid instance.

Parameters
e

◆ __init__() [5/6]

None CDPL.Math.FGrid.__init__ ( ConstDGridExpression  e)

Initializes the FGrid instance.

Parameters
e

◆ __init__() [6/6]

None CDPL.Math.FGrid.__init__ ( object  e)

Initializes the FGrid instance.

Parameters
e

Member Function Documentation

◆ resize()

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

◆ clear()

None CDPL.Math.FGrid.clear ( float   v = 0.0)
Parameters
v

◆ getObjectID()

int CDPL.Math.FGrid.getObjectID ( )

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

Different Python FGrid 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 FGrid 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]

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

Replaces the current state of self with a copy of the state of the ConstFGridExpression instance e.

Parameters
eThe ConstFGridExpression instance to copy.
Returns
self

◆ assign() [2/4]

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

Replaces the current state of self with a copy of the state of the ConstDGridExpression instance e.

Parameters
eThe ConstDGridExpression instance to copy.
Returns
self

◆ assign() [3/4]

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

Replaces the current state of self with a copy of the state of the object instance e.

Parameters
eThe object instance to copy.
Returns
self

◆ assign() [4/4]

FGrid CDPL.Math.FGrid.assign ( FGrid  g)

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

Parameters
gThe FGrid instance to copy.
Returns
self

◆ getSize1()

int CDPL.Math.FGrid.getSize1 ( )
Returns

◆ getSize2()

int CDPL.Math.FGrid.getSize2 ( )
Returns

◆ getSize3()

int CDPL.Math.FGrid.getSize3 ( )
Returns

◆ isEmpty()

bool CDPL.Math.FGrid.isEmpty ( )
Returns

◆ getElement() [1/2]

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

◆ getElement() [2/2]

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

◆ toArray()

object CDPL.Math.FGrid.toArray ( )
Returns

◆ getSize()

int CDPL.Math.FGrid.getSize ( )
Returns

◆ swap()

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

◆ setElement() [1/2]

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

◆ setElement() [2/2]

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

◆ __call__() [1/2]

float CDPL.Math.FGrid.__call__ ( int  i,
int  j,
int  k 
)
Parameters
i
j
k
Returns

◆ __call__() [2/2]

float CDPL.Math.FGrid.__call__ ( int  i)
Parameters
i
Returns

◆ __getitem__() [1/2]

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

◆ __getitem__() [2/2]

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

◆ __len__()

int CDPL.Math.FGrid.__len__ ( )
Returns

◆ __eq__() [1/2]

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

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

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

◆ __eq__() [2/2]

bool CDPL.Math.FGrid.__eq__ ( ConstFGridExpression  e)

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

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

◆ __ne__() [1/2]

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

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

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

◆ __ne__() [2/2]

bool CDPL.Math.FGrid.__ne__ ( ConstFGridExpression  e)

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

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

◆ __str__()

str CDPL.Math.FGrid.__str__ ( )

Returns a string representation of the FGrid instance.

Returns
The generated string representation.

◆ __pos__()

FGrid CDPL.Math.FGrid.__pos__ ( )
Returns

◆ __neg__()

ConstFGridExpression CDPL.Math.FGrid.__neg__ ( )
Returns

◆ __add__()

ConstFGridExpression CDPL.Math.FGrid.__add__ ( ConstFGridExpression  e)

Returns the result of the addition operation self + e.

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

◆ __sub__()

ConstFGridExpression CDPL.Math.FGrid.__sub__ ( ConstFGridExpression  e)

Returns the result of the subtraction operation self - e.

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

◆ __mul__()

ConstFGridExpression CDPL.Math.FGrid.__mul__ ( float  t)

Returns the result of the multiplication operation self * t.

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

◆ __div__()

ConstFGridExpression CDPL.Math.FGrid.__div__ ( float  t)

Returns the result of the division operation self / t.

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

◆ __truediv__()

ConstFGridExpression CDPL.Math.FGrid.__truediv__ ( float  t)
Parameters
t
Returns

◆ __rmul__()

ConstFGridExpression CDPL.Math.FGrid.__rmul__ ( float  t)
Parameters
t
Returns

◆ __setitem__() [1/2]

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

◆ __setitem__() [2/2]

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

◆ __iadd__() [1/2]

FGrid CDPL.Math.FGrid.__iadd__ ( FGrid  g)

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

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

◆ __iadd__() [2/2]

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

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

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

◆ __isub__() [1/2]

FGrid CDPL.Math.FGrid.__isub__ ( FGrid  g)

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

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

◆ __isub__() [2/2]

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

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

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

◆ __imul__()

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

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

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

◆ __idiv__()

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

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

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

◆ __itruediv__()

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