diff options
| author | Guillaume Horel <guillaume.horel@gmail.com> | 2017-06-09 12:50:59 -0400 |
|---|---|---|
| committer | Guillaume Horel <guillaume.horel@gmail.com> | 2017-06-09 12:50:59 -0400 |
| commit | b2d9a4665c5c7513b600da7c9a916d2b66c62c2a (patch) | |
| tree | d3423640f633a0c4efc39aaf82ef61dd4acac9ce | |
| parent | 23e7a3e30dce6b4c4e176e440b8c9405c58f9b9a (diff) | |
| download | pyisda-boost.tar.gz | |
add unordered_map from boostboost
| -rw-r--r-- | pyisda/credit_index.pxd | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/pyisda/credit_index.pxd b/pyisda/credit_index.pxd index e4b2d37..e059228 100644 --- a/pyisda/credit_index.pxd +++ b/pyisda/credit_index.pxd @@ -2,8 +2,26 @@ from legs cimport TContingentLeg, TFeeLeg from date cimport TDate from curve cimport TCurve, TRatePt, shared_ptr from libcpp.vector cimport vector -from libcpp.unordered_map cimport unordered_map from libcpp.string cimport string +from libcpp.pair cimport pair + +cdef extern from "<boost/unordered_map.hpp>" namespace "boost" nogil: + cdef cppclass unordered_map[T, U]: + cppclass iterator: + pair[T, U]& operator*() + iterator operator++() + iterator operator--() + bint operator==(iterator) + bint operator!=(iterator) + unordered_map() except + + unordered_map(unordered_map&) except + + bint empty() + size_t size() + iterator end() + iterator find(T&) + void clear() + U& operator[](T&) + iterator begin() cdef class CurveList: cdef TDate base_date |
