summaryrefslogtreecommitdiff
path: root/python/src/utils.pxd
diff options
context:
space:
mode:
authorPatrick Simianer <simianer@cl.uni-heidelberg.de>2012-06-13 14:42:07 +0200
committerPatrick Simianer <simianer@cl.uni-heidelberg.de>2012-06-13 14:42:07 +0200
commite6d3c25191873ca0cf99db8e89702ed91d65277c (patch)
treeb0697ece6f5e4a8229915758c68750793a23f776 /python/src/utils.pxd
parent62c805c90c5347b844f92574e240db5c65578e12 (diff)
parent3acdf1e4b37637d6df86a7b54fb0f1b0464c172b (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'python/src/utils.pxd')
-rw-r--r--python/src/utils.pxd53
1 files changed, 53 insertions, 0 deletions
diff --git a/python/src/utils.pxd b/python/src/utils.pxd
new file mode 100644
index 00000000..786cd265
--- /dev/null
+++ b/python/src/utils.pxd
@@ -0,0 +1,53 @@
+from libcpp.string cimport string
+from libcpp.vector cimport vector
+
+cdef extern from "<iostream>" namespace "std":
+ cdef cppclass istream:
+ pass
+ cdef cppclass ostream:
+ pass
+ cdef cppclass istringstream(istream):
+ istringstream(char*)
+
+cdef extern from "utils/weights.h":
+ ctypedef double weight_t
+
+cdef extern from "utils/logval.h":
+ cdef cppclass LogVal[T]:
+ pass
+
+cdef extern from "utils/prob.h":
+ cdef cppclass prob_t:
+ pass
+
+cdef extern from "utils/wordid.h":
+ ctypedef int WordID
+
+cdef extern from "utils/sparse_vector.h":
+ cdef cppclass SparseVector[T]:
+ pass
+
+cdef extern from "utils/tdict.cc" namespace "TD":
+ cdef string GetString(vector[WordID] st)
+
+cdef extern from "utils/verbose.h":
+ cdef void SetSilent(bint)
+
+cdef extern from "utils/fdict.h" namespace "FD":
+ WordID FDConvert "FD::Convert" (char*)
+ string& FDConvert "FD::Convert" (WordID)
+
+cdef extern from "utils/filelib.h":
+ cdef cppclass ReadFile:
+ ReadFile(string)
+ istream* stream()
+
+cdef extern from "utils/sampler.h":
+ cdef cppclass MT19937:
+ pass
+
+"""
+cdef extern from "<boost/shared_ptr.hpp>" namespace "boost":
+ cdef cppclass shared_ptr[T]:
+ void reset(T*)
+"""