summaryrefslogtreecommitdiff
path: root/decoder/kbest.h
diff options
context:
space:
mode:
authorgraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-26 20:06:49 +0000
committergraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-26 20:06:49 +0000
commit0b3f354adbe8703fe2540247dc3d1bcdda7ea709 (patch)
treed9b259eccbd7182c83b9b7636d046b983e2a3b94 /decoder/kbest.h
parent53a8a8f1b78be3732a372276135f763d57b72847 (diff)
cpbin sentserver too (dep used by parallelize.pl
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@425 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder/kbest.h')
-rw-r--r--decoder/kbest.h6
1 files changed, 3 insertions, 3 deletions
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 {