From 0b3f354adbe8703fe2540247dc3d1bcdda7ea709 Mon Sep 17 00:00:00 2001 From: graehl Date: Mon, 26 Jul 2010 20:06:49 +0000 Subject: cpbin sentserver too (dep used by parallelize.pl git-svn-id: https://ws10smt.googlecode.com/svn/trunk@425 ec762483-ff6d-05da-a07a-a48fb63a330f --- decoder/kbest.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'decoder') diff --git a/decoder/kbest.h b/decoder/kbest.h index b6f55502..4dcd1362 100644 --- a/decoder/kbest.h +++ b/decoder/kbest.h @@ -83,16 +83,16 @@ namespace KBest { explicit EdgeHandle(Derivation const* d) : d(d) { } // operator bool() const { return d->edge; } operator Hypergraph::Edge const* () const { return d->edge; } -// const Hypergraph::Edge* operator ->() const { return d->edge; } +// Hypergraph::Edge const * operator ->() const { return d->edge; } }; -// typedef Derivation EdgeHandle; // will cause copying, below but not performance critical; change to actual handle if you want EdgeHandle operator()(int t,int taili,EdgeHandle const& parent) const { return EdgeHandle(nds[t].D[parent.d->j[taili]]); } std::string derivation_tree(Derivation const& d,bool indent=true,int show_mask=Hypergraph::SPAN|Hypergraph::RULE,int maxdepth=0x7FFFFFFF,int depth=0) const { - return d.edge->derivation_tree(*this,EdgeHandle(&d),indent,show_mask,maxdepth,depth); + EdgeHandle eh(d); + return d.edge->derivation_tree(*this,eh,indent,show_mask,maxdepth,depth); } struct DerivationUniquenessHash { -- cgit v1.2.3