From 9619c91e3eea2e5eb13d42e02d39730189ebc577 Mon Sep 17 00:00:00 2001 From: Victor Chahuneau Date: Sun, 1 Jul 2012 00:38:30 -0400 Subject: [python] MT evaluation --- python/src/utils.pxd | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'python/src/utils.pxd') diff --git a/python/src/utils.pxd b/python/src/utils.pxd index 3d518524..94fab5ef 100644 --- a/python/src/utils.pxd +++ b/python/src/utils.pxd @@ -50,16 +50,19 @@ cdef extern from "utils/sparse_vector.h": FastSparseVector[weight_t] operator+(FastSparseVector[weight_t]&, FastSparseVector[weight_t]&) FastSparseVector[weight_t] operator-(FastSparseVector[weight_t]&, FastSparseVector[weight_t]&) + FastSparseVector[weight_t] operator*(FastSparseVector[weight_t]&, double&) + FastSparseVector[weight_t] operator/(FastSparseVector[weight_t]&, double&) ostream operator<<(ostream& out, FastSparseVector[weight_t]& v) cdef extern from "utils/weights.h" namespace "Weights": void InitSparseVector(vector[weight_t]& dv, FastSparseVector[weight_t]* sv) -cdef extern from "utils/tdict.cc" namespace "TD": +cdef extern from "utils/tdict.h" namespace "TD": string GetString(vector[WordID]& st) unsigned NumWords() WordID TDConvert "TD::Convert" (char*) char* TDConvert "TD::Convert" (WordID) + void ConvertSentence(string& sent, vector[WordID]* ids) cdef extern from "utils/verbose.h": void SetSilent(bint) @@ -76,3 +79,8 @@ cdef extern from "utils/filelib.h": cdef extern from "utils/sampler.h": cdef cppclass MT19937: pass + +cdef extern from "" namespace "boost": + cdef cppclass shared_ptr[T]: + shared_ptr(shared_ptr& r) + T* get() -- cgit v1.2.3