diff options
Diffstat (limited to 'decoder/hg_test.h')
-rw-r--r-- | decoder/hg_test.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/decoder/hg_test.h b/decoder/hg_test.h index 2e308c37..e96cb0b1 100644 --- a/decoder/hg_test.h +++ b/decoder/hg_test.h @@ -64,12 +64,21 @@ Name HGjsons[]= { } +void AddNullEdge(Hypergraph* hg) { + TRule x; + x.arity_ = 0; + hg->nodes_[0].in_edges_.push_back(hg->AddEdge(TRulePtr(new TRule(x)), Hypergraph::TailNodeVector())->id_); + hg->edges_.back().head_node_ = 0; +} + void HGSetup::CreateTinyLatticeHG(Hypergraph* hg) { Json(hg,HGjsons[TinyLatticeHG]); + AddNullEdge(hg); } void HGSetup::CreateLatticeHG(Hypergraph* hg) { Json(hg,HGjsons[LatticeHG]); + AddNullEdge(hg); } void HGSetup::CreateHG_tiny(Hypergraph* hg) { |