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 | 1b6f3ecd054ed0c5a810d0311984829b8719a9ff (patch) | |
tree | c40963a72fb141ff0b4af91462b05e2922d449ef /python/src/utils.pxd | |
parent | f6bd206d83d8e71227e42c933f56c2ccd43fe013 (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) |