Chemical Data Processing Library Python API - Version 1.1.1
|
Public Member Functions | |
None | __init__ () |
Creates an empty list. | |
None | __init__ (MolecularGraphMatchExpressionList expr) |
Initializes a copy of the MolecularGraphMatchExpressionList instance expr. More... | |
int | getObjectID () |
Returns the numeric identifier (ID) of the wrapped C++ class instance. More... | |
int | getSize () |
Returns the number of elements stored in the list. More... | |
bool | isEmpty () |
Tells whether the list is empty (getSize() == 0). More... | |
None | resize (int num_elem, MolecularGraphMatchExpression value) |
Inserts or erases elements at the end so that the size becomes num_elem. More... | |
None | reserve (int num_elem) |
Preallocates memory for (at least) num_elem elements. More... | |
int | getCapacity () |
Returns the number of elements for which memory has been allocated. More... | |
None | clear () |
Erases all elements. | |
MolecularGraphMatchExpressionList | assign (MolecularGraphMatchExpressionList array) |
Replaces the current state of self with a copy of the state of the MolecularGraphMatchExpressionList instance array. More... | |
None | assign (int num_elem, MolecularGraphMatchExpression value) |
This function fills the list with num_elem copies of the given value. More... | |
None | addElement (MolecularGraphMatchExpression value) |
Inserts a new element at the end of the list. More... | |
None | addElements (MolecularGraphMatchExpressionList values) |
None | insertElement (int idx, MolecularGraphMatchExpression value) |
Inserts a new element before the location specified by the index idx. More... | |
None | insertElements (int idx, int num_elem, MolecularGraphMatchExpression value) |
Inserts num_elem copies of value before the location specified by the index idx. More... | |
None | insertElements (int index, MolecularGraphMatchExpressionList values) |
None | popLastElement () |
Removes the last element of the list. More... | |
None | removeElement (int idx) |
Removes the element at the position specified by the index idx. More... | |
None | removeElements (int begin_idx, int end_idx) |
MolecularGraphMatchExpression | getFirstElement () |
Returns a reference to the first element of the list. More... | |
MolecularGraphMatchExpression | getLastElement () |
Returns a reference to the last element of the list. More... | |
MolecularGraphMatchExpression | getElement (int idx) |
Returns a reference to the element at index idx. More... | |
None | setElement (int idx, MolecularGraphMatchExpression value) |
Assigns a new value to the element specified by the index idx. More... | |
None | __delitem__ (int idx) |
MolecularGraphMatchExpression | __getitem__ (int idx) |
int | __len__ () |
None | __setitem__ (int index, MolecularGraphMatchExpression value) |
bool | __eq__ (object expr) |
Returns the result of the comparison operation self == expr . More... | |
bool | __ne__ (object expr) |
Returns the result of the comparison operation self != expr . More... | |
Public Member Functions inherited from CDPL.Chem.MolecularGraphMatchExpression | |
bool | requiresAtomBondMapping () |
Tells whether the expression must be reevaluated after a query to target atom/bond mapping candidate has been found. More... | |
bool | __call__ (MolecularGraph query_molgraph, MolecularGraph target_molgraph, Base.Any aux_data) |
Performs an evaluation of the expression for the given query and target molecular graphs. More... | |
bool | __call__ (MolecularGraph query_molgraph, MolecularGraph target_molgraph, AtomBondMapping mapping, Base.Any aux_data) |
Performs an evaluation of the expression for the given query and target molecular graphs under consideration of the provided candidate atom/bond mapping. More... | |
Properties | |
objectID = property(getObjectID) | |
size = property(getSize) | |
Properties inherited from CDPL.Chem.MolecularGraphMatchExpression | |
objectID = property(getObjectID) | |
None CDPL.Chem.MolecularGraphMatchExpressionList.__init__ | ( | MolecularGraphMatchExpressionList | expr | ) |
Initializes a copy of the MolecularGraphMatchExpressionList instance expr.
expr | The MolecularGraphMatchExpressionList instance to copy. |
int CDPL.Chem.MolecularGraphMatchExpressionList.getObjectID | ( | ) |
Returns the numeric identifier (ID) of the wrapped C++ class instance.
Different Python MolecularGraphMatchExpressionList 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 MolecularGraphMatchExpressionList 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()
.
Reimplemented from CDPL.Chem.MolecularGraphMatchExpression.
int CDPL.Chem.MolecularGraphMatchExpressionList.getSize | ( | ) |
Returns the number of elements stored in the list.
bool CDPL.Chem.MolecularGraphMatchExpressionList.isEmpty | ( | ) |
Tells whether the list is empty (getSize() == 0).
True
if the list is empty, False
otherwise. None CDPL.Chem.MolecularGraphMatchExpressionList.resize | ( | int | num_elem, |
MolecularGraphMatchExpression | value | ||
) |
Inserts or erases elements at the end so that the size becomes num_elem.
num_elem | The new size. |
value | The value for newly inserted elements. |
None CDPL.Chem.MolecularGraphMatchExpressionList.reserve | ( | int | num_elem | ) |
Preallocates memory for (at least) num_elem elements.
If num_elem is less than or equal to the current capacity, this call has no effect. Otherwise, it is a request for allocation of additional memory. If the request is successful, then the capacity is greater than or equal to num_elem. Otherwise, the capacity is unchanged. In either case, the number of elements will not change.
num_elem | The number of elements to reserve memory for. |
int CDPL.Chem.MolecularGraphMatchExpressionList.getCapacity | ( | ) |
Returns the number of elements for which memory has been allocated.
The capacity is always greater than or equal to the number of currently stored elements.
MolecularGraphMatchExpressionList CDPL.Chem.MolecularGraphMatchExpressionList.assign | ( | MolecularGraphMatchExpressionList | array | ) |
Replaces the current state of self with a copy of the state of the MolecularGraphMatchExpressionList instance array.
array | The MolecularGraphMatchExpressionList instance to copy. |
None CDPL.Chem.MolecularGraphMatchExpressionList.assign | ( | int | num_elem, |
MolecularGraphMatchExpression | value | ||
) |
This function fills the list with num_elem copies of the given value.
Note that the assignment completely changes the list and the new size is the same as the number of elements assigned. Old data will be lost.
num_elem | The number of elements to be assigned. |
value | The value to be assigned. |
None CDPL.Chem.MolecularGraphMatchExpressionList.addElement | ( | MolecularGraphMatchExpression | value | ) |
Inserts a new element at the end of the list.
value | The value of the new element. |
None CDPL.Chem.MolecularGraphMatchExpressionList.addElements | ( | MolecularGraphMatchExpressionList | values | ) |
values |
None CDPL.Chem.MolecularGraphMatchExpressionList.insertElement | ( | int | idx, |
MolecularGraphMatchExpression | value | ||
) |
Inserts a new element before the location specified by the index idx.
idx | The location where to insert the new element. |
value | The value of the element to insert. |
Base.IndexError | if the list is empty or idx is not in the range [0, getSize()]. |
None CDPL.Chem.MolecularGraphMatchExpressionList.insertElements | ( | int | idx, |
int | num_elem, | ||
MolecularGraphMatchExpression | value | ||
) |
Inserts num_elem copies of value before the location specified by the index idx.
idx | The location where to insert the new elements. |
num_elem | The number of elements to insert. |
value | The value of the elements to insert. |
Base.IndexError | if idx is not in the range [0, getSize()]. |
None CDPL.Chem.MolecularGraphMatchExpressionList.insertElements | ( | int | index, |
MolecularGraphMatchExpressionList | values | ||
) |
index | |
values |
None CDPL.Chem.MolecularGraphMatchExpressionList.popLastElement | ( | ) |
Removes the last element of the list.
Base.OperationFailed | if the list is empty. |
None CDPL.Chem.MolecularGraphMatchExpressionList.removeElement | ( | int | idx | ) |
Removes the element at the position specified by the index idx.
idx | The zero-based index of the element to remove. |
Base.IndexError | if the list is empty or idx is not in the range [0, getSize() - 1]. |
None CDPL.Chem.MolecularGraphMatchExpressionList.removeElements | ( | int | begin_idx, |
int | end_idx | ||
) |
begin_idx | |
end_idx |
MolecularGraphMatchExpression CDPL.Chem.MolecularGraphMatchExpressionList.getFirstElement | ( | ) |
Returns a reference to the first element of the list.
Base.OperationFailed | if the list is empty. |
MolecularGraphMatchExpression CDPL.Chem.MolecularGraphMatchExpressionList.getLastElement | ( | ) |
Returns a reference to the last element of the list.
Base.OperationFailed | if the list is empty. |
MolecularGraphMatchExpression CDPL.Chem.MolecularGraphMatchExpressionList.getElement | ( | int | idx | ) |
Returns a reference to the element at index idx.
The method is equivalent to operator[](std::size_t).
idx | The zero-based index of the element. |
Base.IndexError | if the list is empty or idx is not in the range [0, getSize() - 1]. |
None CDPL.Chem.MolecularGraphMatchExpressionList.setElement | ( | int | idx, |
MolecularGraphMatchExpression | value | ||
) |
Assigns a new value to the element specified by the index idx.
idx | The zero-based index of the element for which to assign a new value. |
value | The new value of the element after assignment. |
Base.IndexError | if the list is empty or idx is not in the range [0, getSize() - 1]. |
None CDPL.Chem.MolecularGraphMatchExpressionList.__delitem__ | ( | int | idx | ) |
idx |
MolecularGraphMatchExpression CDPL.Chem.MolecularGraphMatchExpressionList.__getitem__ | ( | int | idx | ) |
idx |
int CDPL.Chem.MolecularGraphMatchExpressionList.__len__ | ( | ) |
None CDPL.Chem.MolecularGraphMatchExpressionList.__setitem__ | ( | int | index, |
MolecularGraphMatchExpression | value | ||
) |
index | |
value |
bool CDPL.Chem.MolecularGraphMatchExpressionList.__eq__ | ( | object | expr | ) |
Returns the result of the comparison operation self == expr
.
expr | The object instance to be compared with. |
bool CDPL.Chem.MolecularGraphMatchExpressionList.__ne__ | ( | object | expr | ) |
Returns the result of the comparison operation self != expr
.
expr | The object instance to be compared with. |