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

Represents the outcome of mathematical expressions/operations that result in a matrix. More...

+ Inheritance diagram for CDPL.Math.LMatrixExpression:

Public Member Functions

None swap (LMatrixExpression e)
 Swaps the contents of this matrix expression with those of e. More...
 
LMatrixExpression assign (LMatrixExpression e)
 Assigns the contents of the matrix expression e to this expression. More...
 
LMatrixExpression assign (ConstFMatrixExpression e)
 Assigns the contents of the matrix expression e to this expression. More...
 
LMatrixExpression assign (ConstDMatrixExpression e)
 Assigns the contents of the matrix expression e to this expression. More...
 
LMatrixExpression assign (ConstLMatrixExpression e)
 Assigns the contents of the matrix expression e to this expression. More...
 
LMatrixExpression assign (ConstULMatrixExpression e)
 Assigns the contents of the matrix expression e to this expression. More...
 
None assign (object a)
 Assigns the contents of the 2D numpy.ndarray object a to this matrix expression. More...
 
None setElement (int i, int j, int v)
 Sets the value of the element (i, j) to v. More...
 
None __setitem__ (tuple ij, int v)
 Sets the value of the element (i, j) to v. More...
 
LMatrixExpression __iadd__ (LMatrixExpression e)
 Adds the matrix expression e element-wise to this expression. More...
 
LMatrixExpression __iadd__ (ConstLMatrixExpression e)
 Adds the matrix expression e element-wise to this expression. More...
 
LMatrixExpression __isub__ (LMatrixExpression e)
 Subtracts the matrix expression e element-wise from this expression. More...
 
LMatrixExpression __isub__ (ConstLMatrixExpression e)
 Subtracts the matrix expression e element-wise from this expression. More...
 
LMatrixExpression __imul__ (int t)
 Multiplies every element by the scalar t. More...
 
LMatrixExpression __idiv__ (int t)
 Divides every element by the scalar t. More...
 
LMatrixExpression __itruediv__ (int t)
 Divides every element by the scalar t. More...
 
- Public Member Functions inherited from CDPL.Math.ConstLMatrixExpression
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
int getSize1 ()
 Returns the number of rows. More...
 
int getSize2 ()
 Returns the number of columns. More...
 
bool isEmpty ()
 Tells whether the matrix is empty. More...
 
int getElement (int i, int j)
 Returns the element at (i, j). More...
 
object toArray ()
 Converts the ConstLMatrixExpression instance into a corresponding numpy.ndarray object. More...
 
int __call__ (int i, int j)
 Returns the element at (i, j). More...
 
int __getitem__ (tuple ij)
 Returns the element at (i, j). More...
 
int __len__ ()
 Returns the number of rows. More...
 
bool __eq__ (ConstLMatrixExpression e)
 Returns the result of the comparison operation self == e. More...
 
bool __ne__ (ConstLMatrixExpression e)
 Returns the result of the comparison operation self != e. More...
 
str __str__ ()
 Returns a string representation of the ConstLMatrixExpression instance. More...
 
ConstLMatrixExpression __pos__ ()
 Returns self. More...
 
ConstLMatrixExpression __neg__ ()
 Returns the result of the operation self * -1. More...
 
ConstLMatrixExpression __add__ (ConstLMatrixExpression e)
 Returns the result of the addition operation self + e. More...
 
ConstLMatrixExpression __sub__ (ConstLMatrixExpression e)
 Returns the result of the subtraction operation self - e. More...
 
ConstLMatrixExpression __mul__ (int t)
 Returns the result of the multiplication operation self * t. More...
 
ConstLMatrixExpression __mul__ (ConstLMatrixExpression e)
 Returns the result of the multiplication operation self * e. More...
 
ConstLVectorExpression __mul__ (ConstLVectorExpression e)
 Returns the result of the multiplication operation self * e. More...
 
ConstLMatrixExpression __div__ (int t)
 Returns the result of the division operation self // t. More...
 
ConstLMatrixExpression __truediv__ (int t)
 Returns the result of the true division operation self / t. More...
 
ConstLMatrixExpression __rmul__ (int t)
 Returns the result of the multiplication operation t * self. More...
 

Additional Inherited Members

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

Detailed Description

Represents the outcome of mathematical expressions/operations that result in a matrix.

Member Function Documentation

◆ swap()

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

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

Parameters
eThe matrix expression to swap with.

◆ assign() [1/6]

LMatrixExpression CDPL.Math.LMatrixExpression.assign ( LMatrixExpression  e)

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

Parameters
eThe source matrix expression.
Returns
self.

◆ assign() [2/6]

LMatrixExpression CDPL.Math.LMatrixExpression.assign ( ConstFMatrixExpression  e)

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

Parameters
eThe source matrix expression.
Returns
self.

◆ assign() [3/6]

LMatrixExpression CDPL.Math.LMatrixExpression.assign ( ConstDMatrixExpression  e)

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

Parameters
eThe source matrix expression.
Returns
self.

◆ assign() [4/6]

LMatrixExpression CDPL.Math.LMatrixExpression.assign ( ConstLMatrixExpression  e)

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

Parameters
eThe source matrix expression.
Returns
self.

◆ assign() [5/6]

LMatrixExpression CDPL.Math.LMatrixExpression.assign ( ConstULMatrixExpression  e)

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

Parameters
eThe source matrix expression.
Returns
self.

◆ assign() [6/6]

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

Assigns the contents of the 2D numpy.ndarray object a to this matrix expression.

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

◆ setElement()

None CDPL.Math.LMatrixExpression.setElement ( int  i,
int  j,
int  v 
)

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

Parameters
iThe zero-based row index.
jThe zero-based column index.
Exceptions
Base.IndexErrorif any of the indices is out of range.

◆ __setitem__()

None CDPL.Math.LMatrixExpression.__setitem__ ( tuple  ij,
int  v 
)

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

Parameters
iThe zero-based row index.
jThe zero-based column index.
vThe new value of the element.
Exceptions
Base.IndexErrorif any of the indices is out of range.

◆ __iadd__() [1/2]

LMatrixExpression CDPL.Math.LMatrixExpression.__iadd__ ( LMatrixExpression  e)

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

Parameters
eThe source matrix expression.
Returns
self.

◆ __iadd__() [2/2]

LMatrixExpression CDPL.Math.LMatrixExpression.__iadd__ ( ConstLMatrixExpression  e)

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

Parameters
eThe source matrix expression.
Returns
self.

◆ __isub__() [1/2]

LMatrixExpression CDPL.Math.LMatrixExpression.__isub__ ( LMatrixExpression  e)

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

Parameters
eThe source matrix expression.
Returns
self.

◆ __isub__() [2/2]

LMatrixExpression CDPL.Math.LMatrixExpression.__isub__ ( ConstLMatrixExpression  e)

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

Parameters
eThe source matrix expression.
Returns
self.

◆ __imul__()

LMatrixExpression CDPL.Math.LMatrixExpression.__imul__ ( int  t)

Multiplies every element by the scalar t.

Parameters
tThe scalar multiplier.
Returns
self.

◆ __idiv__()

LMatrixExpression CDPL.Math.LMatrixExpression.__idiv__ ( int  t)

Divides every element by the scalar t.

Parameters
tThe scalar divisor.
Returns
self.

◆ __itruediv__()

LMatrixExpression CDPL.Math.LMatrixExpression.__itruediv__ ( int  t)

Divides every element by the scalar t.

Parameters
tThe scalar divisor.
Returns
self.