mirror of
https://github.com/rdkit/rdkit.git
synced 2026-06-03 21:44:30 +08:00
* extend the allowed valences of the alkali earths make it possible to have preferred and arbitrary valence states (I thought this already worked) * backup * maybe needed * copy in some swig3 files; at this point the tests all work * remove SWIG version lock * changes in response to review
33 lines
732 B
OpenEdge ABL
33 lines
732 B
OpenEdge ABL
/* -----------------------------------------------------------------------------
|
|
* extend_std_vector.i
|
|
* ----------------------------------------------------------------------------- */
|
|
|
|
|
|
%extend std::vector {
|
|
bool equals(const vector<T> &o){
|
|
if(self->size()==o.size()){
|
|
std::vector< T >::const_iterator sIt=self->begin();
|
|
std::vector< T >::const_iterator oIt=o.begin();
|
|
while(sIt != self->end()){
|
|
if(*sIt != *oIt) return false;
|
|
++sIt;
|
|
++oIt;
|
|
}
|
|
return true;
|
|
} else {
|
|
return false;
|
|
}
|
|
}
|
|
};
|
|
|
|
// suggested in the CHANGELOG for SWIG 4.0
|
|
%extend std::vector {
|
|
vector(size_type count) { return new std::vector< T >(count); }
|
|
}
|
|
|
|
%include "std_vector.i"
|
|
|
|
|
|
|
|
|