add dunder methods to interface file

release/4.3a0
Varun Agrawal 2024-01-16 15:17:16 -05:00
parent 3bc2d97447
commit f4ea551153
1 changed files with 15 additions and 0 deletions

View File

@ -39,6 +39,11 @@ class KeyList {
void remove(size_t key);
void serialize() const;
// Specual dunder methods for Python wrapping
__len__();
__contains__(size_t key);
__iter__();
};
// Actually a FastSet<Key>
@ -64,6 +69,11 @@ class KeySet {
bool count(size_t key) const; // returns true if value exists
void serialize() const;
// Specual dunder methods for Python wrapping
__len__();
__contains__(size_t key);
__iter__();
};
// Actually a vector<Key>, needed for Matlab
@ -85,6 +95,11 @@ class KeyVector {
void push_back(size_t key) const;
void serialize() const;
// Specual dunder methods for Python wrapping
__len__();
__contains__(size_t key);
__iter__();
};
// Actually a FastMap<Key,int>