Chemical Data Processing Library Python API - Version 1.1.1
Public Member Functions | Properties | List of all members
CDPL.Math.Slice Class Reference
+ Inheritance diagram for CDPL.Math.Slice:

Public Member Functions

None __init__ ()
 Initializes the Slice instance.
 
None __init__ (ast.Slice s)
 Initializes a copy of the Slice instance s. More...
 
None __init__ (int start, int stride, int size)
 Initializes the Slice instance. More...
 
int getStart ()
 
int getStride ()
 
int getSize ()
 
bool isEmpty ()
 
int getIndex (int i)
 
ast.Slice assign (ast.Slice s)
 Replaces the current state of self with a copy of the state of the Slice instance s. More...
 
None swap (ast.Slice s)
 
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
bool __eq__ (ast.Slice s)
 Returns the result of the comparison operation self == s. More...
 
bool __ne__ (ast.Slice s)
 Returns the result of the comparison operation self != s. More...
 
int __call__ (int i)
 
int __getitem__ (int i)
 

Properties

 objectID = property(getObjectID)
 
 start = property(getStart)
 
 stride = property(getStride)
 
 size = property(getSize)
 

Constructor & Destructor Documentation

◆ __init__() [1/2]

None CDPL.Math.Slice.__init__ ( ast.Slice  s)

Initializes a copy of the Slice instance s.

Parameters
sThe Slice instance to copy.

◆ __init__() [2/2]

None CDPL.Math.Slice.__init__ ( int  start,
int  stride,
int  size 
)

Initializes the Slice instance.

Parameters
start
stride
size

Member Function Documentation

◆ getStart()

int CDPL.Math.Slice.getStart ( )
Returns

◆ getStride()

int CDPL.Math.Slice.getStride ( )
Returns

◆ getSize()

int CDPL.Math.Slice.getSize ( )
Returns

◆ isEmpty()

bool CDPL.Math.Slice.isEmpty ( )
Returns

◆ getIndex()

int CDPL.Math.Slice.getIndex ( int  i)
Parameters
i
Returns

◆ assign()

ast.Slice CDPL.Math.Slice.assign ( ast.Slice  s)

Replaces the current state of self with a copy of the state of the Slice instance s.

Parameters
sThe Slice instance to copy.
Returns
self

◆ swap()

None CDPL.Math.Slice.swap ( ast.Slice  s)
Parameters
s

◆ getObjectID()

int CDPL.Math.Slice.getObjectID ( )

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

Different Python Slice 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 Slice 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.

◆ __eq__()

bool CDPL.Math.Slice.__eq__ ( ast.Slice  s)

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

Parameters
sThe Slice instance to be compared with.
Returns
The result of the comparison operation.

◆ __ne__()

bool CDPL.Math.Slice.__ne__ ( ast.Slice  s)

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

Parameters
sThe Slice instance to be compared with.
Returns
The result of the comparison operation.

◆ __call__()

int CDPL.Math.Slice.__call__ ( int  i)
Parameters
i
Returns

◆ __getitem__()

int CDPL.Math.Slice.__getitem__ ( int  i)
Parameters
i
Returns