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

Public Member Functions

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

Properties

 objectID = property(getObjectID)
 
 start = property(getStart)
 
 stop = property(getStop)
 
 size = property(getSize)
 

Constructor & Destructor Documentation

◆ __init__() [1/2]

None CDPL.Math.Range.__init__ ( Range  r)

Initializes a copy of the Range instance r.

Parameters
rThe Range instance to copy.

◆ __init__() [2/2]

None CDPL.Math.Range.__init__ ( int  start,
int  stop 
)

Initializes the Range instance.

Parameters
start
stop

Member Function Documentation

◆ getStart()

int CDPL.Math.Range.getStart ( )
Returns

◆ getStop()

int CDPL.Math.Range.getStop ( )
Returns

◆ getSize()

int CDPL.Math.Range.getSize ( )
Returns

◆ isEmpty()

bool CDPL.Math.Range.isEmpty ( )
Returns

◆ getIndex()

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

◆ assign()

Range CDPL.Math.Range.assign ( Range  r)

Replaces the current state of self with a copy of the state of the Range instance r.

Parameters
rThe Range instance to copy.
Returns
self

◆ swap()

None CDPL.Math.Range.swap ( Range  r)
Parameters
r

◆ getObjectID()

int CDPL.Math.Range.getObjectID ( )

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

Different Python Range 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 Range 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.Range.__eq__ ( Range  r)

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

Parameters
rThe Range instance to be compared with.
Returns
The result of the comparison operation.

◆ __ne__()

bool CDPL.Math.Range.__ne__ ( Range  r)

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

Parameters
rThe Range instance to be compared with.
Returns
The result of the comparison operation.

◆ __call__()

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

◆ __getitem__()

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