diff options
author | Victor Chahuneau <vchahune@cs.cmu.edu> | 2012-07-11 16:08:43 +0900 |
---|---|---|
committer | Victor Chahuneau <vchahune@cs.cmu.edu> | 2012-07-11 16:08:43 +0900 |
commit | 42532406b1246e6f17766b804b8bd5cce828f0fa (patch) | |
tree | b867b7fded89c3de32f0629241a86ea735186884 /python/src/utils.pxd | |
parent | 757f56e391bd2e1d7442ab38fc98aff00d064d38 (diff) |
[python] Direct hypergraph access
- small API changes (*_trees methods)
- decoder config can now passed as arguments
Diffstat (limited to 'python/src/utils.pxd')
-rw-r--r-- | python/src/utils.pxd | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/python/src/utils.pxd b/python/src/utils.pxd index 94fab5ef..15e77c49 100644 --- a/python/src/utils.pxd +++ b/python/src/utils.pxd @@ -9,7 +9,6 @@ cdef extern from "<iostream>" namespace "std": pass cdef cppclass istringstream(istream): istringstream(char*) - ostream cout cdef extern from "utils/weights.h": ctypedef double weight_t @@ -25,7 +24,8 @@ cdef extern from "utils/wordid.h": cdef extern from "utils/small_vector.h": cdef cppclass SmallVector[T]: - pass + T& operator[](unsigned) + unsigned size() cdef extern from "utils/sparse_vector.h": cdef cppclass FastSparseVector[T]: @@ -84,3 +84,11 @@ cdef extern from "<boost/shared_ptr.hpp>" namespace "boost": cdef cppclass shared_ptr[T]: shared_ptr(shared_ptr& r) T* get() + +cdef extern from "<boost/program_options.hpp>": + cdef cppclass variable_value "const boost::program_options::variable_value": + string as_str "as<std::string>" () + + cdef cppclass variables_map "const boost::program_options::variables_map": + unsigned count(char* name) + variable_value& operator[](char* name) |