From 129a22cfcc7651daa4b11ed52e7870249f6373a5 Mon Sep 17 00:00:00 2001
From: Patrick Simianer
Date: Tue, 16 Sep 2014 10:23:14 +0100
Subject: spring cleaning
---
fast/hypergraph.hh | 103 -----------------------------------------------------
1 file changed, 103 deletions(-)
delete mode 100644 fast/hypergraph.hh
(limited to 'fast/hypergraph.hh')
diff --git a/fast/hypergraph.hh b/fast/hypergraph.hh
deleted file mode 100644
index 1c48a88..0000000
--- a/fast/hypergraph.hh
+++ /dev/null
@@ -1,103 +0,0 @@
-#pragma once
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include "grammar.hh"
-#include "semiring.hh"
-#include "sparse_vector.hh"
-#include "weaver.hh"
-
-using namespace std;
-
-
-namespace Hg {
-
-struct Node;
-
-struct Edge {
- Node* head;
- vector tails;
- score_t score;
- G::Rule* rule;
- unsigned int arity = 0;
- unsigned int mark = 0;
-
- inline bool is_marked() { return mark >= arity; }
- friend ostream& operator<<(ostream& os, const Edge& e);
-
- size_t head_id_;
- vector tails_ids_; // node ids
- size_t rule_id_;
-
- MSGPACK_DEFINE(head_id_, tails_ids_, rule_id_, score, arity);
-};
-
-struct Node {
- size_t id;
- string symbol;
- short left;
- short right;
- score_t score;
- vector incoming;
- vector outgoing;
- unsigned int mark;
-
- inline bool is_marked() { return mark >= incoming.size(); };
- friend ostream& operator<<(ostream& os, const Node& n);
-
- MSGPACK_DEFINE(id, symbol, left, right, score);
-};
-
-struct Hypergraph {
- list nodes;
- vector edges;
- unordered_map nodes_by_id;
- unsigned int arity;
-};
-
-template void
-init(const list& nodes, const list::iterator root, const Semiring& semiring);
-
-void
-reset(const list nodes, const vector edges);
-
-void
-topological_sort(list& nodes, const list::iterator root);
-
-void
-viterbi(Hypergraph& hg);
-
-typedef vector Path;
-
-void
-viterbi_path(Hypergraph& hg, Path& p);
-
-void
-derive(const Path& p, const Node* cur, vector& carry);
-
-namespace io {
-
-void
-read(Hypergraph& hg, vector& rules, G::Vocabulary& vocab, const string& fn); // FIXME
-
-void
-write(Hypergraph& hg, vector& rules, const string& fn); // FIXME
-
-void
-manual(Hypergraph& hg, vector& rules);
-
-} // namespace
-
-} // namespace
-
--
cgit v1.2.3